[OE-core] bash ptests: use runuser? also remaining errors.
richard.purdie at linuxfoundation.org
richard.purdie at linuxfoundation.org
Wed Jun 12 00:05:25 UTC 2019
On Tue, 2019-06-11 at 15:00 -0400, Randy MacLeod wrote:
> Richard, et. al.
>
> I have two patches (ptest-runner, bash) that enable all but two [*]
> of the bash-ptests to pass. A potential problem is that when started
> by
> ptest-runner, 'su' (both busybox and util-linux versions), results in
> a few of bash's tests failing whereas they work if started by
> 'runuser'.
> The test failure is due to a warning:
> bash: cannot set terminal process group (16036): \
> Inappropriate ioctl for device
> that contaminates the test logs and makes a diff with the expected
> results fail. I can easily redirect that warning to /dev/null but
> that seems wrong and would be a patch that we'd have to carry in
> oe-core.
>
> To get 'runuser' from util-linux into an image, it seems that you
> need:
> - the RDEPENDS for ptest,
> - REQUIRED_DISTRO_FEATURES = "pam" in bash.inc, and
> - to set the 'pam' DISTRO_FEATURE in your local.conf.
The requirement for pam is a problem as we can't require that for
ptests.
> Is that something you are willing to do for all ptests or perhaps
> just for bash's ptests? If so, I'll clean-up my ptest-runner patch
> and send this to the list.
>
>
> I also considered using util-linux's 'setpriv' but enabling that
> has turned into a mess of dependency loops and other build problems.
> man runuser:
> If the PAM session is not required then recommended solution
> is to use setpriv(1) command.
What kind of dependency loops? Can we just enable it for target builds,
would that help?
> Other solutions to properly starting user tests from root are
> welcome!
Not sure but I think we're going to need to find some. Enabling setpriv
sounds like the easiest first option but it depends on the errors.
Cheers,
Richard
More information about the Openembedded-core
mailing list