On Wed, 2019-05-29 at 09:08 -0400, Randy MacLeod wrote: > On 5/29/19 8:35 AM, Richard Purdie wrote: > > On Tue, 2019-05-28 at 10:31 -0400, Sakib Sajal wrote: > > > The ptest was failing as it was expecting non-root user. > > > Ptests are only run as root. > > > > > > Signed-off-by: Sakib Sajal <[email protected]> > > > Signed-off-by: Randy Macleod <[email protected]> > > > > Rather than patching the code with a patch which we can never > > upstream, > > can we run the ptest under a non-root user? > > We considered that but when I looked for an example of oe-core doing > that but didn't see one. Did I miss it/them? > > I suppose the /usr/lib/bash/ptest/run-ptest script could: > - create a user: say 'bashptest' > - run the tests > - delete the user. > Of course we'd need to add dependencies for the user mgmt tools. > > Is that what you were thinking?
Yes, there is prior art: $ cat recipes-core/glib-2.0/glib-2.0/run-ptest #! /bin/sh set -eux useradd glib2-test su glib2-test -c gnome-desktop-testing-runner glib userdel glib2-test (openssh also adds a test user) Cheers, Richard -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
