]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: update processing of packet log
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Jun 2019 13:41:50 +0000 (15:41 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Jun 2019 13:42:11 +0000 (15:42 +0200)
Two new fields have been added to the packet log, which broke some
of the simulation tests.

test/simulation/test.common

index 951a794b61ab29784292a2cdfed104ee82adc79d..8ed6ad9e258a5771292ff1807a9eed0cb7db1385 100644 (file)
@@ -391,9 +391,9 @@ check_packet_port() {
        for i in $(seq 1 $(get_chronyd_nodes)); do
                test_message 3 0 "node $i:"
 
-               grep -E -q "    $port   [0-9]+\$" tmp/log.packets && \
+               grep -E -q "^([0-9e.+-]+        ){5}$port       " tmp/log.packets && \
                        ! grep -E "^[0-9e.+-]+  $i      " tmp/log.packets | \
-                       grep -E -q -v " $port   [0-9]+\$" && \
+                       grep -E -q -v "^([0-9e.+-]+     ){5}$port       " && \
                        test_ok || test_bad
                [ $? -eq 0 ] || ret=1
        done