From: Miroslav Lichvar Date: Mon, 9 Jun 2025 10:07:50 +0000 (+0200) Subject: test: extend 009-sourceselection test X-Git-Tag: 4.7~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4234dd1f73f85deac001b4e35fe5aef1a7d26b3;p=thirdparty%2Fchrony.git test: extend 009-sourceselection test --- diff --git a/test/simulation/009-sourceselection b/test/simulation/009-sourceselection index 139b6aa2..5a7b5a18 100755 --- a/test/simulation/009-sourceselection +++ b/test/simulation/009-sourceselection @@ -43,4 +43,35 @@ check_chronyd_exit || test_fail check_source_selection || test_fail check_sync || test_fail +# Sources with large distance should be ignored + +servers=1 +server_strata=2 +server_conf="maxclockerror 1000" +jitter=1e-7 +base_delay="(* -1.0 (equal 0.1 (min time 600) 600) (equal 0.1 from 2) (equal 0.1 to 1))" + +run_test || test_fail +check_chronyd_exit || test_fail +check_packet_interval || test_fail +check_source_selection && test_fail +check_sync && test_fail + +check_log_messages "Root distance of 192\.168\.123\.2 exceeds maxdistance of 3\." 1 1 || test_fail + +# Sources with large jitter should be ignored + +server_strata=1 +server_conf=$default_server_conf +server_step="(pulse 64 64)" +base_delay=$default_base_delay + +run_test || test_fail +check_chronyd_exit || test_fail +check_packet_interval || test_fail +check_source_selection && test_fail +check_sync && test_fail + +check_log_messages "Jitter of 192\.168\.123\.1 exceeds maxjitter of 1\." 1 1 || test_fail + test_pass