]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
rt27739: make ixfr test more robust
authorMark Andrews <marka@isc.org>
Tue, 7 Feb 2012 00:20:38 +0000 (00:20 +0000)
committerMark Andrews <marka@isc.org>
Tue, 7 Feb 2012 00:20:38 +0000 (00:20 +0000)
bin/tests/system/ixfr/clean.sh
bin/tests/system/ixfr/setup.sh
bin/tests/system/ixfr/tests.sh

index 50d763d3073ae58f417fe1b5d9c4e6d0c07e59ad..7b629950f20ed0d54e7d8c5ad76416c9e1926455 100644 (file)
 # 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.8.134.1 2012/02/07 00:20:38 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
index c965da98f02838008970ec54198224780b11abe4..56a771fc9dc3539dd2d03e7135d671bf24c09dae 100644 (file)
@@ -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.6.134.1 2012/02/07 00:20:38 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 <<EOF >ns1/named.conf
 options {
index a3e8f36d4083e6bb727fd67f204119c4da4aad72..6dafaed487c870c785166227719e7c4eb5703c21 100644 (file)
@@ -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.8.134.1 2012/02/07 00:20:38 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 ]