From e223d4bb266cdab827c8f8276d577b312a1d4d95 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 2 Nov 2011 08:17:01 +0000 Subject: [PATCH] loop waiting for stub zone to transfer --- bin/tests/system/stub/tests.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/tests/system/stub/tests.sh b/bin/tests/system/stub/tests.sh index ad7fe0bf75..1f3146884c 100644 --- a/bin/tests/system/stub/tests.sh +++ b/bin/tests/system/stub/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.14 2007/06/19 23:47:05 tbox Exp $ +# $Id: tests.sh,v 1.15 2011/11/02 08:17:01 marka Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -23,17 +23,29 @@ SYSTEMTESTTOP=.. status=0 echo "I:trying an axfr that should be denied (NOTAUTH)" -$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || status=1 -grep "; Transfer failed." dig.out.ns3 > /dev/null || status=1 +ret=0 +$DIG +tcp data.child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1 +grep "; Transfer failed." dig.out.ns3 > /dev/null || ret=1 +[ $ret = 0 ] || { status=1; echo "I:failed"; } echo "I:look for stub zone data without recursion (should not be found)" -$DIG +tcp +norec data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 \ - || status=1 -$PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || status=1 +for i in 1 2 3 4 5 6 7 8 9 +do + ret=0 + $DIG +tcp +norec data.child.example. \ + @10.53.0.3 txt -p 5300 > dig.out.ns3 || ret=1 + grep "status: NOERROR" dig.out.ns3 > /dev/null || ret=1 + [ $ret = 0 ] && break + sleep 1 +done +$PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || ret=1 +[ $ret = 0 ] || { status=1; echo "I:failed"; } echo "I:look for stub zone data with recursion (should be found)" -$DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || status=1 -$PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || status=1 +ret=0 +$DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || ret=1 +$PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || ret=1 +[ $ret = 0 ] || { status=1; echo "I:failed"; } echo "I:exit status: $status" exit $status