]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: extend 122-xleave test
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Oct 2021 10:22:55 +0000 (12:22 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 27 Oct 2021 14:22:12 +0000 (16:22 +0200)
test/simulation/122-xleave

index 5cb603dd7ed223784de7fc323136e34239d77e41..bc4c3a7b854f92fa6ec42cfcdbaa48a4955338ee 100755 (executable)
@@ -64,4 +64,26 @@ for rpoll in 4 5 6; do
        rm -f tmp/measurements.log
 done
 
+if check_config_h 'FEAT_CMDMON 1'; then
+       # test client timestamp selection and server timestamp correction
+       base_delay="(+ 1.25e-6 (* -1 (equal 0.1 from 5)))"
+       jitter=1e-9
+       wander=1e-12
+       client_lpeer_options="xleave minpoll 5 maxpoll 5 noselect"
+       client_rpeer_options="xleave minpoll 5 maxpoll 5 noselect"
+       chronyc_conf="doffset -0.1"
+       chronyc_start=7200
+
+       run_test || test_fail
+       check_chronyd_exit || test_fail
+       check_source_selection || test_fail
+       check_sync && test_fail
+
+       check_file_messages "\.2   N  2 111 111 ....   5  5 .\... ..\....e-..  2\....e-06" \
+               290 310 measurements.log || test_fail
+       check_file_messages "\.2   N  2 111 111 ....   5  5 .\... ..\....e-..  .\....e-0[0123]" \
+               0 0 measurements.log || test_fail
+       rm -f tmp/measurements.log
+fi
+
 test_pass