]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle non-zero return codes in serve-stale test
authorTom Krizek <tkrizek@isc.org>
Mon, 19 Jun 2023 15:45:40 +0000 (17:45 +0200)
committerTom Krizek <tkrizek@isc.org>
Fri, 14 Jul 2023 13:49:17 +0000 (15:49 +0200)
bin/tests/system/serve-stale/tests.sh

index b076ba1bdc103df16787cf9fe75faf716fecd1e3..8f7b59e43f3a65285b6f2c19bf6d5faac6e46581 100755 (executable)
@@ -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))