From 4e8802a22db64f0de03b7f2faac2a4fd994ae050 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Mon, 19 Jun 2023 17:45:40 +0200 Subject: [PATCH] Handle non-zero return codes in serve-stale test --- 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 b076ba1bdc..8f7b59e43f 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -1136,7 +1136,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 +$DIG -p ${PORT} +tries=1 +timeout=3 @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 @@ -1784,7 +1784,7 @@ echo_i "sending queries for tests $((n+2))-$((n+4))..." # the second RRSIG lookup triggers the issue in [GL #3622] $DIG -p ${PORT} +tries=1 +timeout=10 @10.53.0.3 longttl.example TXT > dig.out.test$((n+3)) & $DIG -p ${PORT} +tries=1 +timeout=3 @10.53.0.3 longttl.example RRSIG > dig.out.test$((n+4)) & -$DIG -p ${PORT} +tries=1 +timeout=3 @10.53.0.3 longttl.example TXT > dig.out.test$((n+2)) +$DIG -p ${PORT} +tries=1 +timeout=3 @10.53.0.3 longttl.example TXT > dig.out.test$((n+2)) || true # Enable the authoritative name server after stale-answer-client-timeout. n=$((n+1))