diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2020-03-25 21:33:55 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2020-03-25 21:33:55 +0300 |
commit | b8cdb04772aac01bbdaec89d49cd22bc6325e4b8 (patch) | |
tree | 2b031137ef326d9e1848bdb92be536ba03eb2c9d /include/tests_time | |
parent | daa9c42ec083c7d05a8ecb569c2cb06c1dbd70a4 (diff) |
Corrected requirements to run tests
Diffstat (limited to 'include/tests_time')
-rw-r--r-- | include/tests_time | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/tests_time b/include/tests_time index ba2e40c1..23fd0965 100644 --- a/include/tests_time +++ b/include/tests_time @@ -81,7 +81,7 @@ fi # Check for OpenNTPD, ntpctl comes with a "regular" install - if [ -n ${NTPCTLBINARY} ]; then + if [ -n "${NTPCTLBINARY}" ]; then # In contrast to timectl, "synchronised: yes" is not grepped. # Reason: openntpd syncs only if large time corrections are not required or -s is passed. # This might be not intended by the administrator (-s is NOT the default!) @@ -526,14 +526,12 @@ # # Test : TIME-3180 # Description : Report if ntpctl cannot communicate with OpenNTPD - if [ "${NTPD_RUNNING}" -eq 1 ] && [ -n "${NTPCTLBINARY}" ] && [ "${NTP_DAEMON}" == "openntpd" ]; then PREQS_MET="YES" else PREQS_MET="NO" fi - - Register --test-no TIME-3180 --weight L --network NO --category security --description "Report if ntpctl cannot communicate with OpenNTPD" + Register --test-no TIME-3180 --preqs-met "${PREQS_MET}" --weight L --network NO --category security --description "Report if ntpctl cannot communicate with OpenNTPD" if [ ${SKIPTEST} -eq 0 ]; then if [ "${OPENNTPD_COMMUNICATION}" -eq 0 ]; then ReportWarning "${TEST_NO}" "OpenNTPD found, but ntpctl cannot communicate with" "${NTPCTLBINARY} -s status" "Restart OpenNTPD" @@ -544,14 +542,13 @@ # # Test : TIME-3181 # Description : Check status of OpenNTPD time synchronisation - if [ "${NTPD_RUNNING}" -eq 1 ] && [ -n "${NTPCTLBINARY}" ] && [ "${NTP_DAEMON}" == "openntpd" ] && [ "${OPENNTPD_COMMUNICATION}" -eq 1 ]; then PREQS_MET="YES" else PREQS_MET="NO" fi - Register --test-no TIME-3181 --weight L --network NO --category security --description "Check status of OpenNTPD time synchronisation" + Register --test-no TIME-3181 --preqs-met "${PREQS_MET}" --weight L --network NO --category security --description "Check status of OpenNTPD time synchronisation" if [ ${SKIPTEST} -eq 0 ]; then FIND=$(${NTPCTLBINARY} -s status | ${GREPBINARY} "clock synced" ) if [ -z "${FIND}" ]; then @@ -570,7 +567,7 @@ PREQS_MET="NO" fi - Register --test-no TIME-3182 --weight L --network NO --category security --description "Check OpenNTPD has working peers" + Register --test-no TIME-3182 --preqs-met "${PREQS_MET}" --weight L --network NO --category security --description "Check OpenNTPD has working peers" if [ ${SKIPTEST} -eq 0 ]; then # Format is "xx/yy peers valid, ..." FIND=$(${NTPCTLBINARY} -s status | ${EGREPBINARY} -o "[0-9]{1,4}/" | ${EGREPBINARY} -o "[0-9]{1,4}" ) |