From 287688627e12390b659e37642562b8b7dd1245d6 Mon Sep 17 00:00:00 2001 From: besawn <38794505+besawn@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:39:19 -0500 Subject: [PATCH 1/2] Add new testcase to verify site table timezone and compute timezone match --- .../testcase/installation/verify_timezone | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/verify_timezone diff --git a/xCAT-test/autotest/testcase/installation/verify_timezone b/xCAT-test/autotest/testcase/installation/verify_timezone new file mode 100644 index 000000000..76e18eb43 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/verify_timezone @@ -0,0 +1,18 @@ +start:verify_timezone +os:Linux +label:timezone +#stop:yes + +# Check site table timezone +cmd:lsdef -t site -i timezone | awk -F= '{print $2}' +check:rc==0 + +# Check compute node timezone +cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}' +check:rc==0 + +# Verify the compute node timezone matches the site table timezone +cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz +check:rc==0 + +end From 77be922d804abe48e82816fdb9fb74702022b9ee Mon Sep 17 00:00:00 2001 From: besawn <38794505+besawn@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:53:38 -0500 Subject: [PATCH 2/2] Add timezone verification to diskfull and diskless hierarchy tests --- .../reg_linux_diskfull_installation_hierarchy | 10 ++++++++++ .../reg_linux_diskless_installation_hierarchy | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index cfcd0832a..7004e1c8c 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -100,4 +100,14 @@ cmd:xdsh $$CN "cd /xcatpost; rmdir -p dir1/dir2/dir3" check:rc==0 cmd:chdef -m -t node -o $$CN postscripts="dir1/dir2/dir3/foo.bar" check:rc==0 + +# Check site table timezone +cmd:lsdef -t site -i timezone | awk -F= '{print $2}' +check:rc==0 +# Check compute node timezone +cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}' +check:rc==0 +# Verify the compute node timezone matches the site table timezone +cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz +check:rc==0 end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 1d0c719a0..814d499ee 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -213,4 +213,14 @@ check:rc==0 cmd:rmimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 +# Check site table timezone +cmd:lsdef -t site -i timezone | awk -F= '{print $2}' +check:rc==0 +# Check compute node timezone +cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}' +check:rc==0 +# Verify the compute node timezone matches the site table timezone +cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz +check:rc==0 + end