]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
wait for reload completed in emptyzones system test
authorColin Vidal <colin@isc.org>
Mon, 23 Jun 2025 19:54:43 +0000 (21:54 +0200)
committerEvan Hunt <each@isc.org>
Tue, 24 Jun 2025 06:20:30 +0000 (23:20 -0700)
The emptyzones system test ran two consecutive "rndc reload" commands
without waiting for the first one to complete. It used to work because
the commands were serialized, but now an rndc reconfig/reload command is
ignored if another one is already running, so the emptyzones test is
more likely to fail.

Fix this problem by waiting for the log message indicating that all the
zones are loaded before attempting the next reload.

bin/tests/system/emptyzones/tests_emptyzones.py

index 7a8d3966bde97567cbe1d54f59ae9e06a07ae838..20911cc9bdc936e83791ec7fd85fb672c932fa76 100644 (file)
@@ -17,7 +17,9 @@ import isctest
 def test_emptyzones(servers, templates):
     # check that switching to automatic empty zones works
     ns1 = servers["ns1"]
-    ns1.rndc("reload")
+    with ns1.watch_log_from_here() as watcher:
+        ns1.rndc("reload")
+        watcher.wait_for_line("all zones loaded")
     templates.render("ns1/named.conf", {"automatic_empty_zones": True})
     ns1.rndc("reload")
     msg = dns.message.make_query("version.bind", "TXT", "CH")