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

(cherry picked from commit b9246ce7731f6a69a1e90d2c8b004d0153e7043a)
(cherry picked from commit a5015d7791119abf3bfff20a433efd65e6cae3c3)
(cherry picked from commit c369fc06ca230ecc8d7472e57b4e10635dd87a19)

bin/tests/system/xfer/tests.sh

index f1ae81eb45cffa38740e9609508d87e97e58e5f6..a2ad2da85c38e6ad0f4a36f1b03fdff00dc24c01 100755 (executable)
@@ -46,9 +46,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"
@@ -70,7 +70,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"
 
@@ -125,18 +125,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
@@ -157,7 +164,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
@@ -178,7 +185,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
@@ -210,7 +217,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
@@ -381,7 +388,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`