From: Mark Andrews Date: Tue, 7 Feb 2012 00:19:45 +0000 (+0000) Subject: rt27739: make ixfr test more robust X-Git-Tag: v9.10.0a1~1401 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9181e8a0568c37432676bd00b4bdb0dfdabfd6c1;p=thirdparty%2Fbind9.git rt27739: make ixfr test more robust --- diff --git a/bin/tests/system/ixfr/clean.sh b/bin/tests/system/ixfr/clean.sh index 50d763d3073..b44f86c1cb0 100644 --- a/bin/tests/system/ixfr/clean.sh +++ b/bin/tests/system/ixfr/clean.sh @@ -15,9 +15,10 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: clean.sh,v 1.8 2011/09/06 23:46:27 tbox Exp $ +# $Id: clean.sh,v 1.9 2012/02/07 00:19:45 marka Exp $ rm -f ns1/named.conf ns1/myftp.db rm -f ns3/*.jnl ns3/mytest.db ns3/subtest.db rm -f ns4/*.jnl ns4/*.db rm -f */named.memstats +rm -f dig.out diff --git a/bin/tests/system/ixfr/setup.sh b/bin/tests/system/ixfr/setup.sh index c965da98f02..6cbcb8bdf14 100644 --- a/bin/tests/system/ixfr/setup.sh +++ b/bin/tests/system/ixfr/setup.sh @@ -15,9 +15,9 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: setup.sh,v 1.6 2011/09/06 23:46:27 tbox Exp $ +# $Id: setup.sh,v 1.7 2012/02/07 00:19:45 marka Exp $ -rm -f ns1/*.db ns1/*.jnl ns3/*.jnl ns4/*.jnl +rm -f ns1/*.db ns1/*.jnl ns3/*.jnl ns4/*.db ns4/*.jnl cat <ns1/named.conf options { diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index a3e8f36d408..ecedbb4a593 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.8 2011/09/06 22:29:32 smann Exp $ +# $Id: tests.sh,v 1.9 2012/02/07 00:19:45 marka Exp $ # WARNING: The test labelled "testing request-ixfr option in view vs zone" @@ -153,7 +153,13 @@ fi cp ns3/mytest1.db ns3/mytest.db $RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload -sleep 2 + +for i in 0 1 2 3 4 5 6 7 8 9 +do + $DIG +tcp -p 5300 @10.53.0.4 SOA test > dig.out + grep -i "hostmaster\.test\..2" dig.out > /dev/null && break + sleep 1 +done # slave should have gotten notify and updated @@ -173,7 +179,13 @@ echo "I:testing request-ixfr option in view vs zone" echo "I: this result should be AXFR" cp ns3/subtest1.db ns3/subtest.db # change to sub.test zone, should be AXFR $RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload -sleep 2 + +for i in 0 1 2 3 4 5 6 7 8 9 +do + $DIG +tcp -p 5300 @10.53.0.4 SOA sub.test > dig.out + grep -i "hostmaster\.test\..3" dig.out > /dev/null && break + sleep 1 +done echo "I: this result should be AXFR" NONINCR=`grep 'sub\.test/IN/primary' ns4/named.run|grep "got nonincremental" | wc -l` @@ -188,7 +200,13 @@ fi echo "I: this result should be IXFR" cp ns3/mytest2.db ns3/mytest.db # change to test zone, should be IXFR $RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload -sleep 2 + +for i in 0 1 2 3 4 5 6 7 8 9 +do + $DIG +tcp -p 5300 @10.53.0.4 SOA test > dig.out + grep -i "hostmaster\.test\..4" dig.out > /dev/null && break + sleep 1 +done INCR=`grep "test/IN/primary" ns4/named.run|grep "got incremental"|wc -l` if [ $INCR -ne 2 ]