diff options
author | Sakib Sajal <sakib.sajal@windriver.com> | 2019-05-31 16:25:52 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-01 11:27:07 +0100 |
commit | 123375542008173b2d8017786d0ccff4a259c7e3 (patch) | |
tree | 546a4a2f2cb2d5d22443ebb5a763f9c70194bfc9 /meta/recipes-extended/bash | |
parent | 56ccaa3b8d639c1e6abe91848dfdf594d997cf66 (diff) | |
download | poky-123375542008173b2d8017786d0ccff4a259c7e3.tar.gz |
bash: run bash ptest as non-root user
new-exp ptest fails as it expects non-root user.
>From the failed ptest log:
< new-exp.tests: the test suite should not be run as root
628c627
< argv[1] = <host(2)[5.0]# >
---
> argv[1] = <host(2)[5.0]$ >
FAIL: run-new-exp
Many of the ptests declare that they should not be run as root
and a few fail since the expected result strings are for a
user shell.
When ptests are run as bash_user (non-root) the glob test
fails with error:
run-glob-test
59,60d58
< touch: cannot touch 'a?': Permission denied
< touch: cannot touch 'aa': Permission denied
So ensure that the bash/ptest/tests directory is owned by the
bash_user while the tests are being run and return it to root
owner afterwards.
(From OE-Core rev: c125609886b36048cfde6e694eee7fb47f197241)
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Randy Macleod <randy.macleod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/bash')
-rw-r--r-- | meta/recipes-extended/bash/bash/run-ptest | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest index c61fabd020..c0cf27b6c2 100644 --- a/meta/recipes-extended/bash/bash/run-ptest +++ b/meta/recipes-extended/bash/bash/run-ptest | |||
@@ -19,4 +19,8 @@ then | |||
19 | echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." | 19 | echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." |
20 | fi | 20 | fi |
21 | 21 | ||
22 | make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest | 22 | useradd bash_user |
23 | chown -R bash_user:bash_user ./tests | ||
24 | su bash_user -c "make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest" | ||
25 | chown -R root:root ./tests | ||
26 | userdel bash_user | ||