]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Also wait for 'zone_dump: zone example/IN: enter'
authorMark Andrews <marka@isc.org>
Mon, 31 Aug 2020 11:09:25 +0000 (21:09 +1000)
committerMark Andrews <marka@isc.org>
Thu, 10 Sep 2020 08:48:52 +0000 (18:48 +1000)
use nextpartpeek as we don't want to reset the starting point

(cherry picked from commit 7b65bea6d2563b3e5dca569d280d10ad63276dc7)

bin/tests/system/views/tests.sh

index 537928fc81a2077c053e179a453e2d377436afe3..e24656a039d125145c959ff7cea3463ed82067d4 100644 (file)
@@ -36,14 +36,16 @@ nextpart ns3/named.run > /dev/null
 $RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 $RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
 
-echo_i "wait for reload"
-a=0 b=0
-for i in 1 2 3 4 5 6 7 8 9 0; do
-        nextpart ns2/named.run | grep "all zones loaded" > /dev/null && a=1
-        nextpart ns3/named.run | grep "all zones loaded" > /dev/null && b=1
-        [ $a -eq 1 -a $b -eq 1 ] && break
-        sleep 1
-done
+echo_i "wait for reload to complete"
+ret=0
+_check_reload() (
+  nextpartpeek ns2/named.run | grep "all zones loaded" > /dev/null && \
+  nextpartpeek ns3/named.run | grep "all zones loaded" > /dev/null && \
+  nextpartpeek ns3/named.run | grep "zone_dump: zone example/IN: enter" > /dev/null
+)
+retry_quiet 10 _check_reload || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
 
 echo_i "fetching a.example from ns2's 10.53.0.4, source address 10.53.0.4"
 $DIG $DIGOPTS -b 10.53.0.4 a.example. @10.53.0.4 any > dig.out.ns4.2 || status=1