Skip to content

Commit

Permalink
[TIME-3148] new test for TZ variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mboelen committed Feb 22, 2017
1 parent 18039ed commit b2f13a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions db/tests.db
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ TIME-3128:test:security:time::Check preffered time source:
TIME-3132:test:security:time::Check NTP falsetickers:
TIME-3136:test:security:time:Linux:Check NTP protocol version:
#TIME-3146:test:security:time:Linux:Check /etc/default/ntpdate:
TIME-3148:test:performance:time:Linux:Check TZ variable:
TIME-3160:test:security:time:Linux:Check empty NTP step-tickers:
TIME-3170:test:security:time::Check configuration files:
TOOL-5002:test:security:tooling::Checking for automation tools:
Expand Down
28 changes: 19 additions & 9 deletions include/tests_time
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,18 @@
#if [ ${SKIPTEST} -eq 0 ]; then
#
#################################################################################
#
# Test : TIME-3148
# Description : Check if TZ variable is set (Linux)
# 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
Report "tz_variable_empty=1"
fi
fi
#
#################################################################################
#
# Test : TIME-3160
# Description : Check empty NTP step-tickers
Expand All @@ -413,7 +425,7 @@
if [ -z ${FILE} ]; then
LogText "Result: ${FILE} is empty. The step-tickers contain no configured NTP servers"
Display --indent 2 --text "- Checking NTP step-tickers file" --result "EMPTY FILE" --color YELLOW
ReportSuggestion ${TEST_NO} "Use step-rickers file for quicker time synchronization"
ReportSuggestion ${TEST_NO} "Use step-tickers file for quicker time synchronization"
else
LogText "Result: /etc/ntp/step-tickers is not empty, which is fine"
Display --indent 2 --text "- Checking NTP step-tickers file" --result "${STATUS_OK}" --color GREEN
Expand Down Expand Up @@ -443,14 +455,6 @@
LogText "Result: test skipped because ${FILE} not found"
fi
fi
#
#################################################################################
#
# For VMs check ntpd.conf : tinker panic 0
#

WaitForKeyPress

#
#################################################################################
#
Expand Down Expand Up @@ -486,6 +490,10 @@ WaitForKeyPress
#
#################################################################################
#

# For VMs check ntpd.conf : tinker panic 0


# OS Time daemons Configuration file
# --------------------------------------------
# AIX xntpd /etc/ntp.conf
Expand All @@ -495,6 +503,8 @@ WaitForKeyPress
# OpenBSD ntpd /etc/ntpd.conf
# Solaris xntpd /etc/inet/ntp.conf

WaitForKeyPress

#
#================================================================================
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com

0 comments on commit b2f13a2

Please sign in to comment.