mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
reduce timing dependencies in system tests
one of the tests in the resolver system test depends on dig getting no response to its first two query attempts, and SERVFAIL on the third after resolution times out. using a 5-second retry timer in dig means the SERVFAIL response could occur while dig is discarding the second query and preparing to send the third. in this case the server's response could be missed. shortening the retry interval to 4 seconds ensures that dig has already sent the third query when the SERVFAIL response arrives. also, the serve-stale system test could fail due to a race in which it timed out after waiting ten seconds for a file to be written, and the dig timeout was just a bit longer. this is addressed by extending the dig timeout to 11 seconds for this test.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user