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.
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")