]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
wait for the reply message before checking to avoid false negative.
authorMark Andrews <marka@isc.org>
Fri, 13 Mar 2020 00:23:40 +0000 (11:23 +1100)
committerMark Andrews <marka@isc.org>
Sun, 15 Mar 2020 23:52:31 +0000 (10:52 +1100)
Waiting for the reply message will ensure that all messages being
looked for exist in the logs at the time of checking.  When the
test was only waiting for the send message there was a race between
grep and the ns1 instance of named logging that it had seen the
request.

(cherry picked from commit a38a3244424c593c7b65bb729683c9d953c2cf87)

bin/tests/system/forward/tests.sh

index 761cf8e267e22bad3adbf2352a033ea5e1eb1920..8db1024b7972f0a64fb79f19574a2bb7f4e275cf 100644 (file)
@@ -199,8 +199,9 @@ echo_i "checking that priming queries are not forwarded ($n)"
 ret=0
 nextpart ns7/named.run >/dev/null
 dig_with_opts +noadd +noauth txt.example1. txt @10.53.0.7 > dig.out.$n.f7 || ret=1
+received_pattern="received packet from 10\.53\.0\.1"
 start_pattern="sending packet to 10\.53\.0\.1"
-retry_quiet 5 wait_for_log ns7/named.run "$start_pattern" || ret=1
+retry_quiet 5 wait_for_log ns7/named.run "$received_pattern" || ret=1
 check_sent 1 ns7/named.run "$start_pattern" ";\.[[:space:]]*IN[[:space:]]*NS$" || ret=1
 sent=`grep -c "10.53.0.7#.* (.): query '\./NS/IN' approved" ns4/named.run`
 [ "$sent" -eq 0 ] || ret=1