[Fuego] [PATCH 2/5] Functional.glibc: modify realpath and absolute path
Qiu, Tingting
qiutt at cn.fujitsu.com
Fri Nov 9 07:05:50 UTC 2018
Hi,Tim
Thanks for your reply.
> > - userdel fuego_test_special; rm /home/test/ -rf;
> > + /usr/sbin/userdel fuego_test_special; rm /home/test/ -rf;
> What is the purpose of using an absolute path here?
When I run this case with fuego, this command is not been found.
When use non-interactive non-login mode to run scripts with fuego, sbin(/usr/sbin) is not added to the PATH on my board.
So maybe an absolute path is better.
Regards,
Qiu Tingting
> -----Original Message-----
> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> Sent: Friday, November 09, 2018 1:14 PM
> To: Qiu, Tingting/仇 婷婷; fuego at lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 2/5] Functional.glibc: modify realpath and
> absolute path
>
>
>
> > -----Original Message-----
> > From: Qiu Tingting on Sunday, August 26, 2018 11:13 PM
> >
> > detail: 1. delete check of useradd
> > 2. run useradd with absolute path
> > 3. modify realpath
> >
> > Signed-off-by: Qiu Tingting <qiutt at cn.fujitsu.com>
> > ---
> > engine/tests/Functional.glibc/fuego_test.sh | 13 +++----------
> > 1 file changed, 3 insertions(+), 10 deletions(-)
> >
> > diff --git a/engine/tests/Functional.glibc/fuego_test.sh
> > b/engine/tests/Functional.glibc/fuego_test.sh
> > index 57ce600..f065b0d 100755
> > --- a/engine/tests/Functional.glibc/fuego_test.sh
> > +++ b/engine/tests/Functional.glibc/fuego_test.sh
> > @@ -2,13 +2,6 @@ tarball=glibc_tests.tar.gz
> >
> > NEED_ROOT=1
> >
> > -function test_pre_check {
> > - is_on_target_path useradd PROGRAM_USERADD
> > - assert_define PROGRAM_USERADD
> > - is_on_target_path userdel PROGRAM_USERDEL
> > - assert_define PROGRAM_USERDEL
>
> This doesn't make any sense to me. useradd and userdel are
> still being used on the target board during the test, so they
> are still dependencies, whether we use an absolute path
> to access them or not.
>
> This dependency should stay.
>
>
> > -}
> > -
> > function test_build {
> > sed -i -e '1i\#define _XOPEN_SOURCE' libnss_test/libnss_compat.c
> > patch -p1 -N -s < $TEST_HOME/glibc-test-dl-return-code-fix.patch
> > @@ -29,13 +22,13 @@ function test_build {
> > if ./anl localhost; then echo 'TEST-9 OK'; else echo 'TEST-9 FAIL';
> fi;
> > if ./nsl; then echo 'TEST-10 OK'; else echo 'TEST-10 FAIL';
> fi;
> >
> > - useradd fuego_test_special;
> > + /usr/sbin/useradd fuego_test_special;
> > passwd fuego_test_special << EOF
> > hello
> > hello
> > EOF
> > if ./nss_compat fuego_test_special hello; then echo 'TEST-11 OK';
> else
> > echo 'TEST-11 FAIL'; fi;
> > - userdel fuego_test_special; rm /home/test/ -rf;
> > + /usr/sbin/userdel fuego_test_special; rm /home/test/ -rf;
> What is the purpose of using an absolute path here?
>
> >
> > cp /etc/nsswitch.conf nsswitch.conf.bk;
> > sed 's/^hosts.*$/hosts: files/g' nsswitch.conf.bk >
> /etc/nsswitch.conf;
> > @@ -47,7 +40,7 @@ EOF
> > if ./nss localhost; then echo 'TEST-13 OK'; else echo 'TEST-13 FAIL';
> fi;
> > cp nsswitch.conf.bk /etc/nsswitch.conf;
> >
> > - if [ -f $(realpath /lib/libBrokenLocale.so.1) ]
> > + if [ -f \$(realpath /lib/libBrokenLocale.so.1) ]
> This seems like an important fix.
>
> I added it in a new commit, with a reported-by for you.
>
>
> > then echo 'TEST-14 OK'; else echo 'TEST-14 FAIL';
> fi;
> > " > run-tests.sh
> >
> > --
> > 2.7.4
>
> The rest of the patch was not applied.
>
> Thank you for the submission. If you have an explanation for removing
> the dependency or using absolute paths, please let me know and we
> can discuss it.
> -- Tim
>
>
More information about the Fuego
mailing list