From 46982b414b74c30b83d3145bff5005026d25542e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 10 Dec 2019 14:53:00 +1100 Subject: [PATCH] Improve forensic logging in "testing basic zone transfer functionality" Split the "testing basic zone transfer functionality" into primary and secondary parts to improve forensic logging. --- bin/tests/system/xfer/tests.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index 13fc762c4a..5c68884fd4 100755 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -19,11 +19,18 @@ status=0 n=0 n=`expr $n + 1` -echo_i "testing basic zone transfer functionality" +echo_i "testing basic zone transfer functionality (from primary)" +tmp=0 $DIG $DIGOPTS example. \ - @10.53.0.2 axfr > dig.out.ns2 || status=1 + @10.53.0.2 axfr > dig.out.ns2 || tmp=1 grep "^;" dig.out.ns2 | cat_i +digcomp dig1.good dig.out.ns2 || tmp=1 +if test $tmp != 0 ; then echo_i "failed"; fi +status=`expr $status + $tmp` + +n=`expr $n + 1` +echo_i "testing basic zone transfer functionality (from secondary) ($n)" # # Spin to allow the zone to tranfer. # @@ -32,17 +39,14 @@ do tmp=0 $DIG $DIGOPTS example. \ @10.53.0.3 axfr > dig.out.ns3 || tmp=1 - grep "^;" dig.out.ns3 > /dev/null - if test $? -ne 0 ; then break; fi + grep "^;" dig.out.ns3 > /dev/null || break echo_i "plain zone re-transfer" sleep 5 done -if test $tmp -eq 1 ; then status=1; fi grep "^;" dig.out.ns3 | cat_i - -digcomp dig1.good dig.out.ns2 || status=1 - -digcomp dig1.good dig.out.ns3 || status=1 +digcomp dig1.good dig.out.ns3 || tmp=1 +if test $tmp != 0 ; then echo_i "failed"; fi +status=`expr $status + $tmp` n=`expr $n + 1` echo_i "testing TSIG signed zone transfers"