diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-04-23 21:06:24 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-04-23 21:06:24 +0300 |
commit | 9e9b95e1daf9d64d7753d37b48e88697b297fa36 (patch) | |
tree | 3da913a9ef4620d2bd3257a058fc384011aef868 | |
parent | b433cf0bac84a23ec118a2cd9fe56f435fa22f10 (diff) |
Apply substite for TIME-3148 and first batch of code enhancements
-rw-r--r-- | include/tests_time | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/tests_time b/include/tests_time index c8540dda..f08ce0d8 100644 --- a/include/tests_time +++ b/include/tests_time @@ -26,7 +26,7 @@ # ################################################################################# # - CRON_DIRS="/etc/cron.d /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly /var/spool/crontabs" + CRON_DIRS="${ROOTDIR}etc/cron.d ${ROOTDIR}etc/cron.hourly ${ROOTDIR}etc/cron.daily ${ROOTDIR}etc/cron.weekly ${ROOTDIR}etc/cron.monthly ${ROOTDIR}var/spool/crontabs" CHRONY_CONF_FILE="" NTP_DAEMON="" NTP_DAEMON_RUNNING=0 @@ -308,7 +308,7 @@ # # Test : TIME-3124 # Description : Check selected time source - if [ ${NTPD_RUNNING} -eq 1 -a ! "${NTPQBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi + if [ ${NTPD_RUNNING} -eq 1 -a ! -z "${NTPQBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no TIME-3124 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check selected time source" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking selected time source" @@ -409,7 +409,10 @@ # Notes : without TZ variable set, a lot of unneeded calls might be performed. Register --test-no TIME-3148 --os Linux --weight L --network NO --category performance --description "Check TZ variable" if [ ${SKIPTEST} -eq 0 ]; then - if [ -z "${TZ}" ]; then + LogText "Test: testing for TZ variable" + FIND="${TZ:=notset}" + LogText "Result: found TZ variable with value ${FIND}" + if [ "${FIND}" = "notset" ]; then Report "tz_variable_empty=1" fi fi @@ -493,9 +496,7 @@ # ################################################################################# # - -# For VMs check ntpd.conf : tinker panic 0 - + # For VMs check ntpd.conf : tinker panic 0 # OS Time daemons Configuration file # -------------------------------------------- @@ -506,7 +507,7 @@ # OpenBSD ntpd /etc/ntpd.conf # Solaris xntpd /etc/inet/ntp.conf -WaitForKeyPress + WaitForKeyPress # #================================================================================ |