From: Ondřej Surý Date: Thu, 14 May 2026 11:58:59 +0000 (+0200) Subject: Tighten serve_stale dig timeouts and inter-step sleeps X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a0db3d65056c25b6876c9b976c1e6cf560b2cd28;p=thirdparty%2Fbind9.git Tighten serve_stale dig timeouts and inter-step sleeps With the TCP fallback now actually firing after repeated UDP timeouts, the resolver covers more retry transitions in the same wall-clock window, and the original 3-second budgets in two steps of the serve_stale test left no margin: the dig client at +timeout=3 and the "sleep 3" before re-enabling the upstream both straddled the moment at which the resolver switched transport, making the asserted outcome race-prone. Drop the dig timeout to 2s and the sleep to 1s so each step lands firmly on one side of the transport switch. Co-authored-by: Evan Hunt Assisted-by: Claude:claude-opus-4-7 --- diff --git a/bin/tests/system/serve_stale/tests.sh b/bin/tests/system/serve_stale/tests.sh index 90841afe6aa..fe862b2949e 100755 --- a/bin/tests/system/serve_stale/tests.sh +++ b/bin/tests/system/serve_stale/tests.sh @@ -1399,7 +1399,7 @@ sleep 2 n=$((n + 1)) echo_i "check notincache.example TXT times out (max-stale-ttl default) ($n)" ret=0 -$DIG -p ${PORT} +tries=1 +timeout=3 @10.53.0.3 notfound.example TXT >dig.out.test$n 2>&1 && ret=1 +$DIG -p ${PORT} +tries=1 +timeout=2 @10.53.0.3 notfound.example TXT >dig.out.test$n 2>&1 && ret=1 grep "timed out" dig.out.test$n >/dev/null || ret=1 grep ";; no servers could be reached" dig.out.test$n >/dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi @@ -1947,7 +1947,7 @@ status=$((status + ret)) # authoritative server. echo_i "sending query for test $((n + 2))" $DIG -p ${PORT} @10.53.0.3 data.example TXT >dig.out.test$((n + 2)) & -sleep 3 +sleep 1 n=$((n + 1)) echo_i "enable responses from authoritative server ($n)"