]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] bring autosign test into sync with master
authorEvan Hunt <each@isc.org>
Fri, 1 Mar 2013 07:45:05 +0000 (23:45 -0800)
committerEvan Hunt <each@isc.org>
Fri, 1 Mar 2013 07:45:05 +0000 (23:45 -0800)
bin/tests/system/autosign/clean.sh
bin/tests/system/autosign/tests.sh

index c02b23ff08316ca1324f0d32acdd6d2586370afc..7355788a0876bda8f3e18aea101965d1e7d36444 100644 (file)
@@ -14,7 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
+# $Id: clean.sh,v 1.15 2012/02/06 23:46:45 tbox Exp $
 
 rm -f */K* */dsset-* */*.signed */trusted.conf */tmp* */*.jnl */*.bk
 rm -f active.key inact.key del.key unpub.key standby.key rev.key
@@ -49,6 +49,7 @@ rm -f ns3/prepub.example.db
 rm -f ns3/prepub.example.db.in
 rm -f ns3/secure-to-insecure2.example.db
 rm -f ns3/nozsk.example.db ns3/inaczsk.example.db
+rm -f ns3/reconf.example.db
 rm -f ns3/ttl*.db
 rm -f signing.out.*
 rm -f ns3/*.nzf
index d15cc6bb5312cd9a573defad67668ccb2d62642e..cc2a78d551b206cabf08cfe82997413df27ccc3c 100644 (file)
@@ -168,11 +168,16 @@ echo "I:resetting nsec3param via rndc signing ($n)"
 ret=0
 $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all autonsec3.example. > /dev/null 2>&1
 $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 1 10 beef autonsec3.example. > /dev/null 2>&1
-sleep 1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list autonsec3.example. > signing.out.test$n 2>&1
-grep "Pending NSEC3 chain 1 1 10 BEEF" signing.out.test$n > /dev/null || ret=1
-num=`grep "Pending " signing.out.test$n | wc -l`
-[ $num -eq 1 ] || ret=1
+for i in 0 1 2 3 4 5 6 7 8 9; do
+       ret=0
+       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list autonsec3.example. > signing.out.test$n 2>&1
+       grep "Pending NSEC3 chain 1 1 10 BEEF" signing.out.test$n > /dev/null || ret=1
+       num=`grep "Pending " signing.out.test$n | wc -l`
+       [ $num -eq 1 ] || ret=1
+       [ $ret -eq 0 ] && break
+       echo "I:waiting ... ($i)"
+       sleep 2
+done
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -218,7 +223,7 @@ echo "I:checking that non-replaceable RRSIGs are logged only once ($n)"
 ret=0
 loglines=`grep "Key nozsk.example/NSEC3RSASHA1/$missing .* retaining signatures" ns3/named.run | wc -l`
 [ "$loglines" -eq 1 ] || ret=1
-loglines=`grep "Key inaczsk.example/NSEC3RSASHA1/$missing .* retaining signatures" ns3/named.run | wc -l`
+loglines=`grep "Key inaczsk.example/NSEC3RSASHA1/$inactive .* retaining signatures" ns3/named.run | wc -l`
 [ "$loglines" -eq 1 ] || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -814,15 +819,21 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
 echo "I:checking secure-to-insecure transition, nsupdate ($n)"
+ret=0
 $NSUPDATE > /dev/null 2>&1 <<END       || status=1
 server 10.53.0.3 5300
 zone secure-to-insecure.example
 update delete secure-to-insecure.example dnskey
 send
 END
-sleep 2
-$DIG $DIGOPTS axfr secure-to-insecure.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
-egrep '(RRSIG|DNSKEY|NSEC)' dig.out.ns3.test$n > /dev/null && ret=1
+for i in 0 1 2 3 4 5 6 7 8 9; do
+       ret=0
+       $DIG $DIGOPTS axfr secure-to-insecure.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
+       egrep '(RRSIG|DNSKEY|NSEC)' dig.out.ns3.test$n > /dev/null && ret=1
+       [ $ret -eq 0 ] && break
+       echo "I:waiting ... ($i)"
+       sleep 2
+done
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -834,9 +845,14 @@ $SETTIME -I now -D now $file > /dev/null
 file="ns3/`cat del2.key`.key"
 $SETTIME -I now -D now $file > /dev/null
 $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sign secure-to-insecure2.example. 2>&1 | sed 's/^/I:ns3 /'
-sleep 2
-$DIG $DIGOPTS axfr secure-to-insecure2.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
-egrep '(RRSIG|DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1
+for i in 0 1 2 3 4 5 6 7 8 9; do
+       ret=0
+       $DIG $DIGOPTS axfr secure-to-insecure2.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
+       egrep '(RRSIG|DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1
+       [ $ret -eq 0 ] && break
+       echo "I:waiting ... ($i)"
+       sleep 2
+done
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -1136,7 +1152,8 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
     lret=0
     rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
     [ "$rekey_calls" -gt 0 ] || lret=1
-    if [ "$lret" = 0 ]; then break; fi
+    if [ "$lret" -eq 0 ]; then break; fi
+    echo "I:waiting ... ($i)"
     sleep 1
 done
 n=`expr $n + 1`