On Sat, Jul 16, 2022 at 12:43:58PM +0200, Bartosz Golaszewski wrote:
On Sat, Jul 16, 2022 at 11:43 AM Miguel Ojeda miguel.ojeda.sandonis@gmail.com wrote:
On Fri, Jul 15, 2022 at 9:27 PM Miguel Ojeda miguel.ojeda.sandonis@gmail.com wrote:
something like `cargo --no-run` as a normal user).
Sorry, that was intended to be `cargo test --no-run` (and the test binary will be in `target/debug/deps`). Also note that is only for the unit tests, though, not doctests. It can get more involved for those if you want to avoid to run Cargo/rustdoc as root.
Hope that helps!
Cheers, Miguel
This does seem to build the test-suite but there's no single executable in target/debug/deps.
As does providing the --enable-tests to configure, btw.
Instead it seems that every test section gets its own executable. Does 'cargo test' run them separately? Or is there a single binary including all of them somewhere else?
AIUI 'cargo test' builds and runs those tests individually.
As we need to run the integration tests as root, and cargo doesn't play nice unless you install it as root, and the executables include md5(?) hashes in their names, it is a major PITA to run the full suite as root. Unless you do everything as root.
Anyway to get those names from cargo?
Assuming the gpio-sim module is already loaded, is it at all possible to run tests as a low privilege user? e.g. udev rules can be added to chown the /dev/gpiochips into a gpio group. Is it possible to do something similar for the configfs and sysfs for the gpio-sim? Or do we need a gpiosimd that will allow a user to launch and control sims without being root ;-).
Cheers, Kent.