]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
loop waiting for stub zone to transfer
authorMark Andrews <marka@isc.org>
Wed, 2 Nov 2011 08:20:44 +0000 (08:20 +0000)
committerMark Andrews <marka@isc.org>
Wed, 2 Nov 2011 08:20:44 +0000 (08:20 +0000)
bin/tests/system/stub/tests.sh

index ad7fe0bf75b3e887b4873061b0cca011fbd16eb2..c129cbc08a4fcf9cf2ceb357498b8fb6af2fbacc 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.14 2007/06/19 23:47:05 tbox Exp $
+# $Id: tests.sh,v 1.14.332.1 2011/11/02 08:20:44 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