From e026df2c32f4de5621bb90945fa6f7a902be2ef5 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Thu, 20 Nov 2025 14:10:45 +0100 Subject: [PATCH] Wait for log zone_needdump is more reliable 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. (cherry picked from commit c17ac426082b2eca802dd1b2e1bb9b4b4b291199) --- bin/tests/system/nsec3/tests_nsec3_reconfig.py | 12 ++++++++++-- .../tests_rollover_zsk_prepublication.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/nsec3/tests_nsec3_reconfig.py b/bin/tests/system/nsec3/tests_nsec3_reconfig.py index 47cd77ecf2..3b791eba11 100644 --- a/bin/tests/system/nsec3/tests_nsec3_reconfig.py +++ b/bin/tests/system/nsec3/tests_nsec3_reconfig.py @@ -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) diff --git a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py index 702c0f26ad..3abf4e2d62 100644 --- a/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py +++ b/bin/tests/system/rollover-zsk-prepub/tests_rollover_zsk_prepublication.py @@ -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)