From: Michał Kępień Date: Tue, 31 Dec 2024 04:40:48 +0000 (+0100) Subject: Account for revised log messages in test code X-Git-Tag: v9.21.4~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2c509521435bba6faf11b3a762f78df02ac8e1;p=thirdparty%2Fbind9.git Account for revised log messages in test code Adjust test code so that it expects the extended output that the dns_message_logpacketfromto() function now emits. --- diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh index f2d4c827b1f..eba63171c4e 100644 --- a/bin/tests/system/forward/tests.sh +++ b/bin/tests/system/forward/tests.sh @@ -268,7 +268,7 @@ echo "//" | sendcmd 10.53.0.6 nextpart ns3/named.run >/dev/null dig_with_opts txt.example7. txt @$f1 >dig.out.$n.f1 || ret=1 # The forwarder for the "example7" zone should only be queried once. -start_pattern="sending packet to 10\.53\.0\.6" +start_pattern="sending packet from [^ ]* to 10\.53\.0\.6" retry_quiet 5 wait_for_log ns3/named.run "$start_pattern" check_sent 1 ns3/named.run "$start_pattern" ";txt\.example7\.[[:space:]]*IN[[:space:]]*TXT$" || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi @@ -280,7 +280,7 @@ 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" +start_pattern="sending packet from [^ ]* to 10\.53\.0\.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 || true) diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh index 950412538ca..8c9c229a19b 100755 --- a/bin/tests/system/legacy/tests.sh +++ b/bin/tests/system/legacy/tests.sh @@ -241,7 +241,7 @@ status=$((status + ret)) n=$((n + 1)) echo_i "checking recursive lookup to edns 512 + no tcp server does not cause query loops ($n)" ret=0 -sent=$(grep -c -F "sending packet to 10.53.0.7" ns1/named.run) +sent=$(grep -c "sending packet from [^ ]* to 10\.53\.0\.7" ns1/named.run) if [ $sent -ge 10 ]; then echo_i "ns1 sent $sent queries to ns7, expected less than 10" ret=1