]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
suppress unnecessary zone transfer
authorMark Andrews <marka@isc.org>
Tue, 10 Dec 2019 03:53:00 +0000 (14:53 +1100)
committerOndřej Surý <ondrej@isc.org>
Tue, 7 Jan 2020 13:23:17 +0000 (14:23 +0100)
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.

bin/tests/system/xfer/tests.sh

index 5c68884fd46e51d195e957530259dc58a566657a..53501a2f492e1449dafbcd5077f21b4ce94b87a9 100755 (executable)
@@ -431,16 +431,19 @@ fi
 n=`expr $n + 1`
 echo_i "test mapped zone with out of zone data ($n)"
 tmp=0
-$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.$n
-grep "status: NOERROR," dig.out.1.$n > /dev/null || tmp=1
+$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1
+grep "status: NOERROR," dig.out.1 > /dev/null || tmp=1
 $PERL $SYSTEMTESTTOP/stop.pl xfer ns3
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3
 for try in 0 1 2 3 4 5 6 7 8 9; do
     iret=0
-    $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n
-    grep "status: NOERROR," dig.out.2.$n > /dev/null || iret=1
-    $DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.$n
-    digcomp knowngood.mapped dig.out.3.$n || iret=1
+    $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2
+    grep "status: NOERROR," dig.out.2 > /dev/null || iret=1
+    if [ "$iret" -eq 0 ]
+    then
+        $DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3
+        digcomp knowngood.mapped dig.out.3 || iret=1
+    fi
     [ "$iret" -eq 0 ] && break
     sleep 1
 done