]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Account for revised log messages in test code
authorMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
Adjust test code so that it expects the extended output that the
dns_message_logpacketfromto() function now emits.

bin/tests/system/forward/tests.sh
bin/tests/system/legacy/tests.sh

index f2d4c827b1ffbd871dde97fa548b434d32e9f803..eba63171c4e29f8055e433f860c6d0f5fc00d7a8 100644 (file)
@@ -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)
index 950412538ca02307c18a32ce174220f29924c978..8c9c229a19bb8c90106d163e72c3abc94af07d48 100755 (executable)
@@ -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