diff --git a/xCAT-test/autotest/testcase/chtab/cases0 b/xCAT-test/autotest/testcase/chtab/cases0 index b0191bd38..68ad379e8 100644 --- a/xCAT-test/autotest/testcase/chtab/cases0 +++ b/xCAT-test/autotest/testcase/chtab/cases0 @@ -79,7 +79,7 @@ description:chtab with error table label:mn_only,ci_test,db cmd:chtab error=error site.comment=error check:rc!=0 -check:output=~no such column|column \"error\" does not exist +check:output=~no such column|column \"error\" does not exist|Unknown column \'error\' end diff --git a/xCAT-test/autotest/testcase/xdcp/cases1 b/xCAT-test/autotest/testcase/xdcp/cases1 index d2b9f9bf1..470f6f7ec 100644 --- a/xCAT-test/autotest/testcase/xdcp/cases1 +++ b/xCAT-test/autotest/testcase/xdcp/cases1 @@ -1,10 +1,10 @@ start:xdcp_nonroot_user label:cn_os_ready,parallel_cmds -cmd:useradd -m xyzzy +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "useradd -m xyzzy";else useradd -m xyzzy;fi check:rc==0 -cmd:bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )" +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";else bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";fi check:rc==0 -cmd:chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";else chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;fi check:rc==0 cmd:xdsh $$CN "useradd -m xyzzy" check:rc==0 @@ -12,12 +12,12 @@ cmd:xdsh $$CN "( cd ~ && tar cf - .ssh ) | ( cd ~xyzzy && tar xf - )" check:rc==0 cmd:xdsh $$CN "chown -R xyzzy ~xyzzy/.ssh" check:rc==0 -cmd:su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "su -c \"xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf\" - xyzzy";else su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy;fi check:rc==0 cmd:xdsh $$CN "stat -c '%U' /tmp/sysctl.conf" check:output=~xyzzy cmd:xdsh $$CN "userdel xyzzy" check:rc==0 -cmd:userdel xyzzy +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "userdel xyzzy";else userdel xyzzy;fi check:rc==0 end diff --git a/xCAT-test/autotest/testcase/xdsh/cases0 b/xCAT-test/autotest/testcase/xdsh/cases0 index bab5e3f52..ff11646b8 100644 --- a/xCAT-test/autotest/testcase/xdsh/cases0 +++ b/xCAT-test/autotest/testcase/xdsh/cases0 @@ -13,7 +13,7 @@ end start:xdsh_regular_command label:cn_os_ready,parallel_cmds -cmd:XCATBYPASS=1 xdsh $$CN "ps -ef" +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$CN "ps -ef";else XCATBYPASS=1 xdsh $$CN "ps -ef";fi check:rc==0 check:output=~$$CN:\s+UID\s+PID\s+PPID\s+C\s+STIME\s+TTY\s+TIME\s+CMD end diff --git a/xCAT-test/autotest/testcase/xdsh/cases1 b/xCAT-test/autotest/testcase/xdsh/cases1 index f097cc54f..5da4adaa9 100644 --- a/xCAT-test/autotest/testcase/xdsh/cases1 +++ b/xCAT-test/autotest/testcase/xdsh/cases1 @@ -3,10 +3,10 @@ description: Test the exit code when command xdsh failed label:cn_os_ready,parallel_cmds cmd:xdsh $$CN date check:rc==0 -cmd:mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;else mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup;fi check:rc==0 cmd:xdsh $$CN date check:rc!=0 -cmd:mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa +cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;else mv /root/.ssh/id_rsa.backup /root/.ssh/id_rsa;fi check:rc==0 end