From a0db3d65056c25b6876c9b976c1e6cf560b2cd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 14 May 2026 13:58:59 +0200 Subject: [PATCH] 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 --- bin/tests/system/serve_stale/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/serve_stale/tests.sh b/bin/tests/system/serve_stale/tests.sh index 90841afe6a..fe862b2949 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)"