]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: add 113-leapsecond
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 4 Jun 2014 13:48:05 +0000 (15:48 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 4 Jun 2014 14:58:41 +0000 (16:58 +0200)
test/simulation/113-leapsecond [new file with mode: 0755]
test/simulation/test.common

diff --git a/test/simulation/113-leapsecond b/test/simulation/113-leapsecond
new file mode 100755 (executable)
index 0000000..3889d2e
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+. test.common
+test_start "leap second"
+
+export CLKNETSIM_START_DATE=$(TZ=UTC date -d 'Dec 30 2008 0:00:00' +'%s')
+
+limit=$[4 * 24 * 3600]
+server_conf="refclock SHM 0 dpoll 10 poll 10
+leapsectz right/UTC"
+server_step="(* 1.0 (equal 0.1 (sum 1.0) $[2 * 24 * 3600 + 1]))"
+client_step="(* 1.0 (equal 0.1 (sum 1.0) $[2 * 24 * 3600 + 1]))"
+refclock_jitter=1e-9
+
+run_test || test_fail
+check_chronyd_exit || test_fail
+check_source_selection || test_fail
+check_packet_interval || test_fail
+check_sync || test_fail
+
+test_pass
index 9c409d88ae34637e94a669412f1ca40fcc206070..4dcb634db73610f713220fb833df47c8c9b38d54 100644 (file)
@@ -18,7 +18,7 @@ export PATH=../../:$PATH
 export CLKNETSIM_PATH=clknetsim
 
 # Known working clknetsim revision
-clknetsim_revision=42ddd9b0529dc4fabe39ceb0049b7eb17562be78
+clknetsim_revision=326b619e36858c1f88240e17317595509e3d00de
 clknetsim_url=https://github.com/mlichvar/clknetsim/archive/$clknetsim_revision.tar.gz
 
 # Only Linux is supported