]> code.ossystems Code Review - openembedded-core.git/commit
bash: run bash ptest as non-root user
authorSakib Sajal <sakib.sajal@windriver.com>
Fri, 31 May 2019 20:25:52 +0000 (16:25 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Jun 2019 10:26:56 +0000 (11:26 +0100)
commitc125609886b36048cfde6e694eee7fb47f197241
treed3167579011371dc663b0ecc97d392a15f1e70c0
parent8e147863c4c0fdc22da92e2e5e35502906eac916
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.

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>
meta/recipes-extended/bash/bash/run-ptest