From 40741cc68648fa9b68a504d3d5729c54847ba5b9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 3 Dec 2012 09:30:38 +1100 Subject: [PATCH] loop 'I:checking expired signatures were updated' test --- bin/tests/system/autosign/clean.sh | 1 + bin/tests/system/autosign/tests.sh | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/tests/system/autosign/clean.sh b/bin/tests/system/autosign/clean.sh index 2dd6aac28d..ffe7a2c176 100644 --- a/bin/tests/system/autosign/clean.sh +++ b/bin/tests/system/autosign/clean.sh @@ -48,3 +48,4 @@ rm -f ns3/prepub.example.db rm -f ns3/prepub.example.db.in rm -f ns3/secure-to-insecure2.example.db rm -f ns3/*.nzf +rm -f digcomp.out.test* diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index 6c032cf2e9..899d20b7dd 100644 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -203,13 +203,18 @@ $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze 2>&1 | sed 's/^/I:ns3 / $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 thaw 2>&1 | sed 's/^/I:ns3 /' echo "I:checking expired signatures were updated ($n)" -ret=0 -$DIG $DIGOPTS +noauth a.oldsigs.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1 -$DIG $DIGOPTS +noauth a.oldsigs.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1 -$PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1 -grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1 +for i in 1 2 3 4 5 6 7 8 9 +do + ret=0 + $DIG $DIGOPTS +noauth a.oldsigs.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1 + $DIG $DIGOPTS +noauth a.oldsigs.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1 + $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n > digcomp.out.test$n || ret=1 + grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1 + [ $ret = 0 ] && break + sleep 1 +done +if [ $ret != 0 ]; then cat digcomp.out.test$n; echo "I:failed"; fi n=`expr $n + 1` -if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` echo "I:checking NSEC->NSEC3 conversion succeeded ($n)"