diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 3874361fb5..a958103c0a 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -805,7 +805,7 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "check that the resolver accepts a reply with empty question section with TC=1 and retries over TCP ($n)" ret=0 -$DIG $DIGOPTS @10.53.0.5 truncated.no-questions. a +tries=3 +time=5 > dig.ns5.out.${n} || ret=1 +$DIG $DIGOPTS @10.53.0.5 truncated.no-questions. a +tries=3 +time=4 > dig.ns5.out.${n} || ret=1 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null || ret=1 grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null || ret=1 @@ -815,7 +815,7 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "check that the resolver rejects a reply with empty question section with TC=0 ($n)" ret=0 -$DIG $DIGOPTS @10.53.0.5 not-truncated.no-questions. a +tries=3 +time=5 > dig.ns5.out.${n} || ret=1 +$DIG $DIGOPTS @10.53.0.5 not-truncated.no-questions. a +tries=3 +time=4 > dig.ns5.out.${n} || ret=1 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null && ret=1 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null && ret=1 grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null && ret=1 diff --git a/bin/tests/system/serve-stale/tests.sh b/bin/tests/system/serve-stale/tests.sh index b787c816ab..518396bde4 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -13,14 +13,16 @@ RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s" -# wait up to ten seconds to ensure that a file has been written +# wait up to 11 seconds to ensure that a file has been written waitfile () { - for try in 0 1 2 3 4 5 6 7 8 9; do + for try in 0 1 2 3 4 5 6 7 8 9 10; do [ -s "$1" ] && break sleep 1 done } +DIG="$DIG +time=11" + max_stale_ttl=$(sed -ne 's,^[[:space:]]*max-stale-ttl \([[:digit:]]*\).*,\1,p' $TOP_SRCDIR/bin/named/config.c) status=0