]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: add 118-maxdelay
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 26 Mar 2015 13:44:12 +0000 (14:44 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 27 Mar 2015 09:37:55 +0000 (10:37 +0100)
test/simulation/118-maxdelay [new file with mode: 0755]

diff --git a/test/simulation/118-maxdelay b/test/simulation/118-maxdelay
new file mode 100755 (executable)
index 0000000..0e27847
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+. test.common
+test_start "maxdelay options"
+
+max_sync_time=2000
+base_delay=1e-5
+jitter=1e-5
+wander=0.0
+freq_offset="(sum 1e-10)"
+time_rms_limit=2e-4
+
+client_server_options="maxdelay 3e-5 maxdelayratio 2.0 maxdelaydevratio 2.0"
+
+run_test || test_fail
+check_chronyd_exit || test_fail
+check_source_selection || test_fail
+check_packet_interval || test_fail
+check_sync || test_fail
+
+for client_server_options in "maxdelay 2e-5" \ "maxdelayratio 1.001"; do
+       run_test || test_fail
+       check_chronyd_exit || test_fail
+       check_packet_interval || test_fail
+       check_sync && test_fail
+done
+
+test_pass