Merge branch 'each-test-fixes' into 'main'

Fix test errors that caused intermittent failures

See merge request isc-projects/bind9!5504
This commit is contained in:
Evan Hunt 2021-10-18 21:19:58 +00:00
commit 9e6ed31b91
4 changed files with 15 additions and 11 deletions

View file

@ -216,7 +216,7 @@ echo_i "wait for secondary to be updated again ($n)"
ret=0
wait_for_txt() {
dig_with_opts @10.53.0.2 TXT foo.dom1.example. > dig.out.test$n || return 1
grep "ANSWER: 1," dig.out.test$n > /dev/null || return 1
grep "ANSWER: 2," dig.out.test$n > /dev/null || return 1
grep "status: NOERROR" dig.out.test$n > /dev/null || return 1
grep "IN.TXT." dig.out.test$n > /dev/null || return 1
}

View file

@ -22,4 +22,4 @@ while (<>) {
die "missing notbefore time" unless $notbefore;
die "missing inception time" unless $inception;
my $delta = $inception - $notbefore;
die "bad inception time $delta" unless abs($delta - $target) < 3;
die "bad inception time $delta" unless abs($delta - $target) <= 3;

View file

@ -1294,7 +1294,7 @@ if [ -x "$DELV" ] ; then
n=$((n+1))
echo_i "check delv +yaml output ($n)"
ret=0
delv_with_opts +yaml @10.53.0.3 any ns2.example > delv.out.test$n 2>&1 || ret=1
delv_with_opts +yaml @10.53.0.3 any ns2.example > delv.out.test$n || ret=1
$PYTHON yamlget.py delv.out.test$n status > yamlget.out.test$n 2>&1 || ret=1
read -r value < yamlget.out.test$n
[ "$value" = "success" ] || ret=1

View file

@ -89,7 +89,11 @@ $DIGCMD +tries=2 +time=1 +recurse @10.53.0.3 foo.info. any > /dev/null 2>&1
ret=0
echo_i "dumping updated stats for ns3 ($n)"
rndc_stats ns3 10.53.0.3 || ret=1
getstats() {
rndc_stats ns3 10.53.0.3 || return 1
grep "2 recursing clients" $last_stats > /dev/null || return 1
}
retry_quiet 5 getstats || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
@ -135,6 +139,13 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
ret=0
echo_i "checking priming queries are counted ($n)"
grep "1 priming queries" $last_stats > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
ret=0
echo_i "checking that zones with slash are properly shown in XML output ($n)"
if $FEATURETEST --have-libxml2 && [ -x ${CURL} ] ; then
@ -236,13 +247,6 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
ret=0
echo_i "checking priming queries are counted ($n)"
grep "1 priming queries" $last_stats
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "Check that 'zone-statistics full;' is processed by 'rndc reconfig' ($n)"
ret=0
# off by default