]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Wait for log zone_needdump is more reliable
authorMatthijs Mekking <matthijs@isc.org>
Thu, 20 Nov 2025 13:10:45 +0000 (14:10 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 1 Dec 2025 13:17:42 +0000 (13:17 +0000)
In some cases we wait for the log message "sending notifies" before
proceeding with the test case. Notifies are rate limited. They are not
sent on every change to the zone. The "zone_needdump" messages happen on
every change.

bin/tests/system/dnssec/tests_policy.py
bin/tests/system/nsec3/tests_nsec3_reconfig.py
bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py

index 672dc8a4a45cd41ecdaf74b174e24cc8014832dc..e813bea44816a798f56a243f620e3b9e48f76dda 100644 (file)
@@ -63,7 +63,9 @@ def test_signatures_validity(ns3, templates):
     templates.render("ns3/named.conf", {"long_sigs": True})
     with ns3.watch_log_from_here() as watcher:
         ns3.reconfigure(log=False)
-        watcher.wait_for_line("siginterval.example/IN (signed): sending notifies")
+        watcher.wait_for_line(
+            "zone_needdump: zone siginterval.example/IN (signed): enter"
+        )
 
     res = isctest.query.tcp(msg, "10.53.0.3")
     after = next(filter(is_rrsig_soa, res.answer))
index 47cd77ecf2fe1a26c86d5aa1426591bb8ae90027..3b791eba11820b8f36a8942e5c4411410a8b065e 100644 (file)
@@ -326,9 +326,13 @@ def test_nsec3_ent(ns3, templates):
     # remove a name, bump the SOA, and reload
     templates.render(f"{ns3.identifier}/nsec3-ent.kasp.db", {"serial": 2})
 
+    messages = [
+        f"zone {zone}/IN (unsigned): loaded serial 2",
+        f"zone_needdump: zone {zone}/IN (signed): enter",
+    ]
     with ns3.watch_log_from_here() as watcher:
         ns3.rndc(f"reload {zone}")
-        watcher.wait_for_line(f"zone {zone}/IN (signed): sending notifies")
+        watcher.wait_for_sequence(messages)
 
     # try the query again
     query = isctest.query.create(f"c.{fqdn}", dns.rdatatype.A)
@@ -345,9 +349,13 @@ def test_nsec3_ent(ns3, templates):
     # add a name with an ENT, bump the SOA, and reload ensuring the time stamp changes
     templates.render(f"{ns3.identifier}/nsec3-ent.kasp.db", {"serial": 3})
 
+    messages = [
+        f"zone {zone}/IN (unsigned): loaded serial 3",
+        f"zone_needdump: zone {zone}/IN (signed): enter",
+    ]
     with ns3.watch_log_from_here() as watcher:
         ns3.rndc(f"reload {zone}")
-        watcher.wait_for_line(f"zone {zone}/IN (signed): sending notifies")
+        watcher.wait_for_sequence(messages)
 
     # try the query again
     query = isctest.query.create(f"x.y.z.{fqdn}", dns.rdatatype.A)
index 30a5104c8b131dbea4f8aedcfe7bff5e4d2f5943..73f249b2586e4daca39eed1da1b2bfa6800cf451 100644 (file)
@@ -225,7 +225,7 @@ def test_zsk_prepub_step3(tld, alg, size, ns3):
     # Force full resign and check all signatures have been replaced.
     with ns3.watch_log_from_here() as watcher:
         ns3.rndc(f"sign {zone}", log=False)
-        watcher.wait_for_line(f"zone {zone}/IN (signed): sending notifies")
+        watcher.wait_for_line(f"zone_needdump: zone {zone}/IN (signed): enter")
 
     step["smooth"] = False
     step["nextev"] = Iret(CONFIG, smooth=False)