]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Downgrade "timeout" and "attempts" arguments in shutdown
authorMichal Nowak <mnowak@isc.org>
Mon, 16 Sep 2024 12:55:06 +0000 (14:55 +0200)
committerMichal Nowak <mnowak@isc.org>
Mon, 23 Sep 2024 13:06:42 +0000 (13:06 +0000)
The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

bin/tests/system/shutdown/tests_shutdown.py

index 121feed7b7aaf56033a7337969c99c854123e875..566a84fc8e4791df82d62c221c58ac8501cf5048 100755 (executable)
@@ -101,7 +101,11 @@ def do_work(named_proc, resolver_ip, instance, kill_method, n_workers, n_queries
 
                 qname = relname + ".test"
                 msg = dns.message.make_query(qname, "A")
-                futures[executor.submit(isctest.query.udp, msg, resolver_ip)] = tag
+                futures[
+                    executor.submit(
+                        isctest.query.udp, msg, resolver_ip, timeout=1, attempts=1
+                    )
+                ] = tag
             elif shutdown:  # We attempt to stop named in the middle
                 shutdown = False
                 if kill_method == "rndc":