From fefcc2fa1c31b3d6a6da5be721192c3024f05cec Mon Sep 17 00:00:00 2001 From: neo954 Date: Thu, 11 May 2017 15:39:20 +0800 Subject: [PATCH] Add test case to check exit code when syncfiles failing (#3013) * Add test case to check exit code when syncfiles failing * Add test case discription for updatenode_diskful_syncfiles_failing --- xCAT-test/autotest/testcase/updatenode/cases3 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 xCAT-test/autotest/testcase/updatenode/cases3 diff --git a/xCAT-test/autotest/testcase/updatenode/cases3 b/xCAT-test/autotest/testcase/updatenode/cases3 new file mode 100644 index 000000000..675d23ed2 --- /dev/null +++ b/xCAT-test/autotest/testcase/updatenode/cases3 @@ -0,0 +1,16 @@ +start:updatenode_diskful_syncfiles_failing +description: Test exit code when syncfiles failing. +cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ +check:rc==0 +cmd:echo "/tmp/non-existent -> /etc/motd" > /install/custom/install/__GETNODEATTR($$CN,os)__/booboo.synclist +check:rc==0 +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/__GETNODEATTR($$CN,os)__/booboo.synclist +check:rc==0 +cmd:updatenode $$CN -F >/tmp/updatenode.F.out +check:rc!=0 +cmd:grep 'updatenode exited with code 1' /tmp/updatenode.F.out +check:rc==0 +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists= +check:rc==0 +cmd:rm -f /install/custom/install/__GETNODEATTR($$CN,os)__/booboo.synclist +end