]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Adjust tests to new notify logs
authorMatthijs Mekking <matthijs@isc.org>
Mon, 1 Dec 2025 15:59:40 +0000 (16:59 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 19 Dec 2025 13:08:15 +0000 (14:08 +0100)
Now that we log the type of the notify, some expected log messages
in the system tests need to be adjusted accordingly.

The bin/tests/system/nsec3/tests_nsec3_retransfer.py log is changed
to zone_needdump because it is more reliable.  Other tests were
adjusted similar in MR !11265, but !11226 introduced a new
"sending notify" log line.

bin/tests/system/notify/tests.sh
bin/tests/system/nsec3/tests_nsec3_retransfer.py
bin/tests/system/xfer-servers-list/tests_xfer_servers_list.py

index 05a9aa828096844aa4c221768a0361a654a5a2aa..d83f5cbee054a3876a9c546a8c6dc6904159d2db 100644 (file)
@@ -45,7 +45,7 @@ for i in 1 2 3 4 5 6 7 8 9 10; do
   $DIG +tcp -p "${PORT}" example @10.53.0.3 soa >dig.out.ns3.test$n || ret=1
   grep "status: NOERROR" dig.out.ns3.test$n >/dev/null || ret=1
   grep "flags:.* aa[ ;]" dig.out.ns3.test$n >/dev/null || ret=1
-  nr=$(grep -c 'x[0-9].*sending notify to' ns2/named.run)
+  nr=$(grep -c 'x[0-9].*sending notify(SOA) to' ns2/named.run)
   [ "$nr" -ge 22 ] || ret=1
   [ $ret = 0 ] && break
   sleep 1
@@ -64,7 +64,7 @@ digcomp dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 test_end
 
 test_start "checking startup notify rate limit"
-awk '/x[0-9].*sending notify to/ {
+awk '/x[0-9].*sending notify\(SOA\) to/ {
   split($1, ts, "T");
        split(ts[2], a, ":");
        this = a[1] * 3600 + a[2] * 60 + a[3];
@@ -101,7 +101,7 @@ test_end
 
 # See [GL#4689]
 test_start "checking server behaviour with invalid notify-source-v6 address"
-grep "zone ./IN: sending notify to fd92:7065:b8e:fffe::a35:4#" ns1/named.run >/dev/null || ret=1
+grep "zone ./IN: sending notify(SOA) to fd92:7065:b8e:fffe::a35:4#" ns1/named.run >/dev/null || ret=1
 grep "dns_request_create: failed address not available" ns1/named.run >/dev/null || ret=1
 test_end
 
@@ -121,15 +121,15 @@ test_end
 
 if $FEATURETEST --have-fips-dh; then
   test_start "checking notify over TLS successful"
-  grep "zone tls-x1/IN: notify to 10.53.0.2#${TLSPORT} successful" ns3/named.run >/dev/null || ret=1
-  grep "zone tls-x2/IN: notify to 10.53.0.2#${EXTRAPORT1} successful" ns3/named.run >/dev/null || ret=1
-  grep "zone tls-x3/IN: notify to 10.53.0.2#${EXTRAPORT1} successful" ns3/named.run >/dev/null || ret=1
-  grep "zone tls-x5/IN: notify to 10.53.0.2#${EXTRAPORT3} successful" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x1/IN: notify(SOA) to 10.53.0.2#${TLSPORT} successful" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x2/IN: notify(SOA) to 10.53.0.2#${EXTRAPORT1} successful" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x3/IN: notify(SOA) to 10.53.0.2#${EXTRAPORT1} successful" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x5/IN: notify(SOA) to 10.53.0.2#${EXTRAPORT3} successful" ns3/named.run >/dev/null || ret=1
   test_end
 
   test_start "checking notify over TLS failed"
-  grep "zone tls-x4/IN: notify to 10.53.0.2#${EXTRAPORT1} failed: TLS peer certificate verification failed" ns3/named.run >/dev/null || ret=1
-  grep "zone tls-x6/IN: notify to 10.53.0.2#${EXTRAPORT4} failed: TLS peer certificate verification failed" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x4/IN: notify(SOA) to 10.53.0.2#${EXTRAPORT1} failed: TLS peer certificate verification failed" ns3/named.run >/dev/null || ret=1
+  grep "zone tls-x6/IN: notify(SOA) to 10.53.0.2#${EXTRAPORT4} failed: TLS peer certificate verification failed" ns3/named.run >/dev/null || ret=1
   test_end
 fi
 
@@ -218,8 +218,8 @@ for i in 1 2 3 4 5 6 7 8 9; do
 done
 grep "test string" "$fnb" >/dev/null || ret=1
 grep "test string" "$fnc" >/dev/null || ret=1
-grep "sending notify to 10.53.0.5#[0-9]* : TSIG (b)" ns5/named.run >/dev/null || ret=1
-grep "sending notify to 10.53.0.5#[0-9]* : TSIG (c)" ns5/named.run >/dev/null || ret=1
+grep "sending notify(SOA) to 10.53.0.5#[0-9]* : TSIG (b)" ns5/named.run >/dev/null || ret=1
+grep "sending notify(SOA) to 10.53.0.5#[0-9]* : TSIG (c)" ns5/named.run >/dev/null || ret=1
 test_end
 
 # notify messages were sent to unresponsive 10.53.0.6 during the tests
index 96a23761b5afbc1a2beb3874359dda5f469b5d6d..7ba4a44845d99a0a6a905ab771fc43c576d371e0 100644 (file)
@@ -123,7 +123,7 @@ def test_nsec3_retransfer(servers, templates):
     with ns3.watch_log_from_here() as watcher:
         ns3.rndc(f"retransfer {zone}")
         # When sending notifies, the zone should be up to date.
-        watcher.wait_for_line(f"zone {zone}/IN (signed): sending notify to 10.53.0.4")
+        watcher.wait_for_line(f"zone_needdump: zone {zone}/IN (signed): enter")
 
     salt = perform_nsec3_tests(ns3, params)
     assert prevsalt == salt
index 54cf2fcaf23c4d7430a165d0dc9a53103cb76b98..cb7553d171a3a1fc888ac563e054ea64d27bfa9c 100644 (file)
@@ -33,7 +33,7 @@ def wait_for_initial_xfrin(ns):
 
 def wait_for_sending_notify(ns1, ns, key_name):
     pattern = Re(
-        f"zone test/IN: sending notify to {ns.ip}#[0-9]+ : TSIG \\({key_name}\\)"
+        f"zone test/IN: sending notify\\(SOA\\) to {ns.ip}#[0-9]+ : TSIG \\({key_name}\\)"
     )
     with ns1.watch_log_from_start() as watcher:
         watcher.wait_for_line(pattern)