From e569e1c9d9de7e4669561743cc6af25daf28c0cd Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 9 Apr 2020 16:51:10 +0200 Subject: [PATCH] test: extend 139-nts test --- test/simulation/139-nts | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/test/simulation/139-nts b/test/simulation/139-nts index e538fb8..3813b52 100755 --- a/test/simulation/139-nts +++ b/test/simulation/139-nts @@ -30,6 +30,7 @@ ntsserverkey tmp/server.key ntsservercert tmp/server.crt ntsprocesses 0 ntsrotate 64 +ntsdumpdir tmp " client_server_options="minpoll 6 maxpoll 6 nts" client_conf=" @@ -43,12 +44,15 @@ check_chronyd_exit || test_fail check_source_selection || test_fail check_sync || test_fail -check_file_messages "20.*123\.1.* 111 111 1111" 90 93 measurements.log || test_fail +check_file_messages "20.*123\.1.* 111 111 1111" 89 93 measurements.log || test_fail check_file_messages "20.*123\.1.* 111 001 0000" 30 32 measurements.log || test_fail +check_file_messages " 2 1 .* 11443 " 200 240 log.packets || test_fail +check_file_messages "." 6 6 ntskeys || test_fail rm -f tmp/measurements.log client_conf+=" -ntsrefresh 120" +ntsrefresh 120 +ntsdumpdir tmp" run_test || test_fail check_chronyd_exit || test_fail @@ -57,6 +61,29 @@ check_sync || test_fail check_file_messages "20.*123\.1.* 111 111 1111" 99 103 measurements.log || test_fail check_file_messages "20.*123\.1.* 111 001 0000" 0 0 measurements.log || test_fail +check_file_messages " 2 1 .* 11443 " 350 390 log.packets || test_fail +check_file_messages "." 6 6 ntskeys || test_fail +check_file_messages "." 11 12 192.168.123.1.nts || test_fail +rm -f tmp/measurements.log + +export CLKNETSIM_START_DATE=$(date -d 'Jan 1 00:00:00 UTC 2010 + 40000 sec' +'%s') + +server_conf+=" +ntsrotate 100000" +client_conf+=" +ntsrefresh 39500" + +run_test || test_fail +check_chronyd_exit || test_fail +check_source_selection || test_fail +check_sync || test_fail + +check_file_messages "20.*123\.1.* 111 111 1111" 150 160 measurements.log || test_fail +check_file_messages "20.*123\.1.* 111 001 0000" 0 0 measurements.log || test_fail +check_file_messages " 2 1 .* 11443 " 6 10 log.packets || test_fail +check_file_messages "^9\.......e+03 2 1 .* 11443 " 6 10 log.packets || test_fail +check_file_messages "." 6 6 ntskeys || test_fail +check_file_messages "." 11 12 192.168.123.1.nts || test_fail rm -f tmp/measurements.log client_conf=" @@ -67,4 +94,7 @@ check_chronyd_exit || test_fail check_source_selection && test_fail check_sync && test_fail +check_file_messages " 2 1 .* 123 " 0 0 log.packets || test_fail +check_file_messages " 2 1 .* 11443 " 10 20 log.packets || test_fail + test_pass