]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
improve reliability of xfer test
authorEvan Hunt <each@isc.org>
Fri, 23 Feb 2018 08:00:09 +0000 (00:00 -0800)
committerEvan Hunt <each@isc.org>
Sat, 24 Feb 2018 09:46:52 +0000 (01:46 -0800)
(cherry picked from commit 5d7d6881a18de57f2c151ef4c58fb3a4fdc2597a)
(cherry picked from commit 09a1a261dc5c8e1f90a5a1f53078ea0796c3466a)

bin/tests/system/xfer/tests.sh

index ab73b70239736b0dd5b4932ac72d164d5ba5394d..da5f834a2b0d8054ea4f285d905b502a8f0b4a38 100755 (executable)
@@ -116,7 +116,22 @@ 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 10 11 12 13 14 15 16 17 18 19 20
+
+for i in 0 1 2 3 4 5 6 7 8 9
+do
+       a=0 b=0 c=0 d=0
+       echo_i "wait for reloads..."
+       $DIG $DIGOPTS @10.53.0.6 +noall +answer soa master > dig.out.soa1.ns6
+       grep "1397051953" dig.out.soa1.ns6 > /dev/null && a=1
+       $DIG $DIGOPTS @10.53.0.1 +noall +answer soa slave  > dig.out.soa2.ns1
+       grep "1397051953" dig.out.soa2.ns1 > /dev/null && b=1
+       $DIG $DIGOPTS @10.53.0.2 +noall +answer soa example > dig.out.soa3.ns2
+       grep "1397051953" dig.out.soa3.ns2 > /dev/null && c=1
+       [ $a -eq 1 -a $b -eq 1 -a $c -eq 1 ] && break
+       sleep 2
+done
+
+for i in 0 1 2 3 4 5 6 7 8 9
 do
        a=0 b=0 c=0 d=0
        echo_i "wait for transfers..."
@@ -124,9 +139,14 @@ do
        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
+       $DIG $DIGOPTS @10.53.0.6 +noall +answer soa slave  > dig.out.soa3.ns6
+       grep "1397051953" dig.out.soa3.ns6 > /dev/null && c=1
        [ $a -eq 1 -a $b -eq 1 -a $c -eq 1 ] && break
+
+       # re-notify if necessary
+       $RNDCCMD 10.53.0.6 notify master 2>&1 | sed 's/^/ns6 /' | cat_i
+       $RNDCCMD 10.53.0.1 notify slave 2>&1 | sed 's/^/ns1 /' | cat_i
+       $RNDCCMD 10.53.0.2 notify example 2>&1 | sed 's/^/ns2 /' | cat_i
        sleep 2
 done