]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Increase ans5 NS response delay in rpzrecurse test 12122/head
authorMichal Nowak <mnowak@isc.org>
Wed, 27 May 2026 21:25:27 +0000 (21:25 +0000)
committerMichal Nowak <mnowak@isc.org>
Mon, 1 Jun 2026 16:00:00 +0000 (18:00 +0200)
The nsip-wait-recurse and nsdname-wait-recurse timing tests
compare query times with wait-recurse yes vs no. With a
1-second NS response delay in ans5, the timing difference is
too small to reliably measure with whole-second granularity,
causing intermittent failures when both cases round to the
same integer.

Increase the delay from 1 to 3 seconds and add explicit dig
timeout options (+time=30 +tries=1) so that dig does not time
out or retry during the slow wait-recurse yes queries.

Assisted-by: Claude:claude-opus-4-7
bin/tests/system/rpzrecurse/ans5/ans.py
bin/tests/system/rpzrecurse/tests.sh

index 4f6fe5ccad4fe0994bd4c7f4b5d749355c4e4f96..9693bf334498c995340b7257ae04942b684aa3d4 100644 (file)
@@ -54,7 +54,7 @@ class DelayNs(ResponseHandler):
             "ns5.foo.",
         )
         qctx.response.answer.append(ns_rrset)
-        yield DnsResponseSend(qctx.response, delay=1)
+        yield DnsResponseSend(qctx.response, delay=3)
 
 
 def main() -> None:
index 5940c88edbc952fc2c15a17d823da61e29af2493..7ff4e5e2a898521519f9f5f3432a614ea30fb44e 100644 (file)
@@ -450,7 +450,7 @@ add_test_marker 10.53.0.2 10.53.0.3
 echo_i "timing 'nsip-wait-recurse yes' (default)"
 ret=0
 t1=$($PERL -e 'print time()."\n";')
-$DIG -p ${PORT} @10.53.0.3 foo.child.example.tld a >dig.out.yes.$t || ret=1
+$DIG -p ${PORT} +time=30 +tries=1 @10.53.0.3 foo.child.example.tld a >dig.out.yes.$t || ret=1
 t2=$($PERL -e 'print time()."\n";')
 p1=$((t2 - t1))
 echo_i "elapsed time $p1 seconds"
@@ -463,7 +463,7 @@ wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
 
 echo_i "timing 'nsip-wait-recurse no'"
 t3=$($PERL -e 'print time()."\n";')
-$DIG -p ${PORT} @10.53.0.3 foo.child.example.tld a >dig.out.no.$t || ret=1
+$DIG -p ${PORT} +time=30 +tries=1 @10.53.0.3 foo.child.example.tld a >dig.out.no.$t || ret=1
 t4=$($PERL -e 'print time()."\n";')
 p2=$((t4 - t3))
 echo_i "elapsed time $p2 seconds"
@@ -485,7 +485,7 @@ add_test_marker 10.53.0.2 10.53.0.3
 echo_i "timing 'nsdname-wait-recurse yes' (default)"
 ret=0
 t1=$($PERL -e 'print time()."\n";')
-$DIG -p ${PORT} @10.53.0.3 foo.child.example.tld a >dig.out.yes.$t || ret=1
+$DIG -p ${PORT} +time=30 +tries=1 @10.53.0.3 foo.child.example.tld a >dig.out.yes.$t || ret=1
 t2=$($PERL -e 'print time()."\n";')
 p1=$((t2 - t1))
 echo_i "elapsed time $p1 seconds"
@@ -498,7 +498,7 @@ wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
 
 echo_i "timing 'nsdname-wait-recurse no'"
 t3=$($PERL -e 'print time()."\n";')
-$DIG -p ${PORT} @10.53.0.3 foo.child.example.tld a >dig.out.no.$t || ret=1
+$DIG -p ${PORT} +time=30 +tries=1 @10.53.0.3 foo.child.example.tld a >dig.out.no.$t || ret=1
 t4=$($PERL -e 'print time()."\n";')
 p2=$((t4 - t3))
 echo_i "elapsed time $p2 seconds"