]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
improve reliability of the xfer test on slow systems
authorEvan Hunt <each@isc.org>
Fri, 23 Feb 2018 02:34:16 +0000 (18:34 -0800)
committerEvan Hunt <each@isc.org>
Fri, 23 Feb 2018 06:08:02 +0000 (22:08 -0800)
- lengthed the wait loop for the transfers to complete

bin/tests/system/xfer/tests.sh

index 727bc1285dd0bc1f572c5dbd2d1780a7901f5528..ab73b70239736b0dd5b4932ac72d164d5ba5394d 100755 (executable)
@@ -37,9 +37,9 @@ done
 if test $tmp -eq 1 ; then status=1; fi
 grep "^;" dig.out.ns3 | cat_i
 
-$PERL ../digcomp.pl dig1.good dig.out.ns2 || status=1
+{ $PERL ../digcomp.pl dig1.good dig.out.ns2 || status=1; } | cat_i
 
-$PERL ../digcomp.pl dig1.good dig.out.ns3 || status=1
+{ $PERL ../digcomp.pl dig1.good dig.out.ns3 || status=1; } | cat_i
 
 n=`expr $n + 1`
 echo_i "testing TSIG signed zone transfers"
@@ -61,7 +61,7 @@ done
 if test $tmp -eq 1 ; then status=1; fi
 grep "^;" dig.out.ns3 | cat_i
 
-$PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
+{ $PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1; } | cat_i
 
 echo_i "reload servers for in preparation for ixfr-from-differences tests"
 
@@ -116,18 +116,25 @@ status=`expr $status + $tmp`
 n=`expr $n + 1`
 echo_i "testing ixfr-from-differences yes;"
 tmp=0
-for i in 0 1 2 3 4 5 6 7 8 9
+for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 do
-       $DIG $DIGOPTS @10.53.0.3 +noall +answer soa example > dig.out.soa.ns3
-       grep "1397051953" dig.out.soa.ns3 > /dev/null && break;
-       sleep 1
+       a=0 b=0 c=0 d=0
+       echo_i "wait for transfers..."
+       $DIG $DIGOPTS @10.53.0.3 +noall +answer soa example > dig.out.soa1.ns3
+       grep "1397051953" dig.out.soa1.ns3 > /dev/null && a=1
+       $DIG $DIGOPTS @10.53.0.3 +noall +answer soa master > dig.out.soa2.ns3
+       grep "1397051953" dig.out.soa2.ns3 > /dev/null && b=1
+       $DIG $DIGOPTS @10.53.0.6 +noall +answer soa slave  > dig.out.soa3.ns3
+       grep "1397051953" dig.out.soa3.ns3 > /dev/null && c=1
+       [ $a -eq 1 -a $b -eq 1 -a $c -eq 1 ] && break
+       sleep 2
 done
 
 $DIG $DIGOPTS example. \
        @10.53.0.3 axfr > dig.out.ns3 || tmp=1
 grep "^;" dig.out.ns3 | cat_i
 
-$PERL ../digcomp.pl dig2.good dig.out.ns3 || tmp=1
+{ $PERL ../digcomp.pl dig2.good dig.out.ns3 || tmp=1; } | cat_i
 
 # ns3 has a journal iff it received an IXFR.
 test -f ns3/example.bk || tmp=1
@@ -148,7 +155,7 @@ $DIG $DIGOPTS master. \
        @10.53.0.3 axfr > dig.out.ns3 || tmp=1
 grep "^;" dig.out.ns3 > /dev/null && cat_i dig.out.ns3
 
-$PERL ../digcomp.pl dig.out.ns6 dig.out.ns3 || tmp=1
+{ $PERL ../digcomp.pl dig.out.ns6 dig.out.ns3 || tmp=1; } | cat_i
 
 # ns3 has a journal iff it received an IXFR.
 test -f ns3/master.bk || tmp=1
@@ -169,7 +176,7 @@ $DIG $DIGOPTS slave. \
        @10.53.0.1 axfr > dig.out.ns1 || tmp=1
 grep "^;" dig.out.ns1 | cat_i
 
-$PERL ../digcomp.pl dig.out.ns6 dig.out.ns1 || tmp=1
+{ $PERL ../digcomp.pl dig.out.ns6 dig.out.ns1 || tmp=1; } | cat_i
 
 # ns6 has a journal iff it received an IXFR.
 test -f ns6/slave.bk || tmp=1
@@ -201,7 +208,7 @@ $DIG $DIGOPTS slave. \
        @10.53.0.7 axfr > dig.out.ns7 || tmp=1
 grep "^;" dig.out.ns1 | cat_i
 
-$PERL ../digcomp.pl dig.out.ns7 dig.out.ns1 || tmp=1
+{ $PERL ../digcomp.pl dig.out.ns7 dig.out.ns1 || tmp=1; } | cat_i
 
 # ns7 has a journal iff it generates an IXFR.
 test -f ns7/slave.bk || tmp=1
@@ -404,7 +411,7 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3
 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n
 grep "status: NOERROR," dig.out.2.$n > /dev/null || tmp=1
 $DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.$n
-$PERL ../digcomp.pl knowngood.mapped dig.out.3.$n || tmp=1
+{ $PERL ../digcomp.pl knowngood.mapped dig.out.3.$n || tmp=1; } | cat_i
 if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`