]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: fix packet interval check
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 3 Jun 2014 12:18:48 +0000 (14:18 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 3 Jun 2014 12:59:21 +0000 (14:59 +0200)
test/simulation/105-ntpauth
test/simulation/107-allowdeny
test/simulation/112-port
test/simulation/test.common

index d696446ee3009753e8121d1df56d110acfb50d28..66ea2a511ceefc50830c7e5516648d4c01acaf13 100755 (executable)
@@ -27,16 +27,16 @@ server_conf=""
 
 run_test || test_fail
 check_chronyd_exit || test_fail
-# These checks must fail as the server doesn't know the key
+# This check must fail as the server doesn't know the key
 check_sync && test_fail
-check_packet_interval && test_fail
+check_packet_interval || test_fail
 
 server_conf="keyfile tmp/keys"
 client_conf=""
 
 run_test || test_fail
 check_chronyd_exit || test_fail
-# These checks must fail as the client doesn't know the key
+# This check must fail as the client doesn't know the key
 check_sync && test_fail
-check_packet_interval && test_fail
+check_packet_interval || test_fail
 test_pass
index 7b163126e9b3eef1a3782d1d21337805fd6ebb16..a87aed0214b5f912b9fc63d23e373aed83325a39 100755 (executable)
@@ -19,9 +19,9 @@ allow 192.168.124.0/24"
 do
        run_test || test_fail
        check_chronyd_exit || test_fail
+       check_packet_interval || test_fail
        # These checks are expected to fail
        check_source_selection && test_fail
-       check_packet_interval && test_fail
        check_sync && test_fail
 done
 
index 605d4d3018cda507dec5ebfe187764f872f43978..74777afdd1d936ef9a9f0d38ab6ef68622df532c 100755 (executable)
@@ -29,9 +29,9 @@ do
        run_test || test_fail
        check_chronyd_exit || test_fail
        check_packet_port || test_fail
+       check_packet_interval || test_fail
        # These checks are expected to fail
        check_source_selection && test_fail
-       check_packet_interval && test_fail
        check_sync && test_fail
 done
 
index 8ed8c4b840f059844215df66b4caec0f42af5941..611b31f54f08b36492eb228daa150a489f63d014 100644 (file)
@@ -18,7 +18,7 @@ export PATH=../../:$PATH
 export CLKNETSIM_PATH=clknetsim
 
 # Known working clknetsim revision
-clknetsim_revision=8a7f9e753b0548e78ef3ef750da547a54d405bde
+clknetsim_revision=6647b1e11cf715676361c0fb449a23ade82947b9
 clknetsim_url=https://github.com/mlichvar/clknetsim/archive/$clknetsim_revision.tar.gz
 
 # Only Linux is supported
@@ -281,12 +281,12 @@ check_packet_interval() {
                # incoming is not longer than outgoing for stratum 1 servers, and
                # outgoing is not longer than incoming for clients.
                nodes=$[$servers * $server_strata + $clients]
-               check_stat $in_interval 0.1 $limit && \
-                       check_stat $out_interval 0.1 $limit && \
+               check_stat $in_interval 0.1 inf && \
+                       check_stat $out_interval 0.1 inf && \
                        ([ $i -gt $servers ] || \
                                check_stat $in_interval 0.0 $out_interval) && \
                        ([ $i -le $[$servers * $server_strata] ] || \
-                               check_stat $in_interval 0.0 $out_interval) && \
+                               check_stat $out_interval 0.0 $in_interval) && \
                        test_ok || test_bad
 
                [ $? -eq 0 ] || ret=1