Re: [libgpiod][PATCH V9 7/8] bindings: rust: Add tests for libgpiod crate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 09, 2022 at 05:50:10PM +0800, Kent Gibson wrote:
> On Wed, Nov 09, 2022 at 10:30:55AM +0100, Bartosz Golaszewski wrote:
> > On Mon, Nov 7, 2022 at 10:58 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
> > >
> > > Add tests for the rust bindings, quite similar to the ones in cxx
> > > bindings.
> > >
> > > Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> > 
> > Without modifying udev rules on my system - is there a one-liner I
> > could use to launch the tests? I guess using cargo as sudo is wrong
> > but the executables are there so can I somehow run them all at once as
> > if running `cargo test`?
> > 
> 
> I use:
> 
> sudo /home/dev/.cargo/bin/cargo test
> 
> so using the cargo installed in the dev account on my test machine.
> 
> That way I can build, clippy and generate docs etc as dev, but require
> sudo for the tests.
> 
> I would love to know how to do it without the sudo, but as you suggest,
> that would probably require some udev magic or something to set the
> configfs and sysfs file permissions, as well as the gpiochips themselves,
> and given the above works for me I've not had sufficient incentive to
> look into it.
> 

And just to be clear, my libgpiod test machine is a VM, so running as
root isn't a huge issue.

Being able to run tests against gpiosim on a real machine, without
requiring root, would be really nice to have though.

Cheers,
Kent.




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux