[Fuego] [PATCH 2/5] Functional.glibc: modify realpath and absolute path

Qiu Tingting qiutt at cn.fujitsu.com
Mon Aug 27 06:12:49 UTC 2018


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
-}
-
 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;
 
     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) ]
                          then echo 'TEST-14 OK'; else echo 'TEST-14 FAIL'; fi;
     " > run-tests.sh
 
-- 
2.7.4





More information about the Fuego mailing list