]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
wait for status: line to be readable, before checking status
authorMark Andrews <marka@isc.org>
Wed, 3 Jan 2018 02:54:26 +0000 (13:54 +1100)
committerMark Andrews <marka@isc.org>
Wed, 3 Jan 2018 02:56:42 +0000 (13:56 +1100)
(cherry picked from commit 46741274436a909f6cecf068b3eeb12f11753f54)

bin/tests/system/rpzrecurse/tests.sh

index 799b5f662075920e27d0af57913f9fb40d55792b..ecd306dcecfcb9128ca4599c326dc7d0ea21e4ba 100644 (file)
@@ -196,11 +196,12 @@ kill -CONT $PID
 for n in 1 2 3 4 5 6 7 8 9; do
     sleep 1
     [ -s dig.out.${t} ] || continue
-    grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
-        echo "I:test ${t} failed"
-        status=1
-    }
+    grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
 done
+grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
+    echo "I:test ${t} failed"
+    status=1
+}
 
 echo "I:check recursive behavior consistency during policy removal races"
 cp ns2/saved.policy.local ns2/db.6a.00.policy.local
@@ -241,11 +242,12 @@ kill -CONT $PID
 for n in 1 2 3 4 5 6 7 8 9; do
     sleep 1
     [ -s dig.out.${t} ] || continue
-    grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
-        echo "I:test ${t} failed"
-        status=1
-    }
+    grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
 done
+grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
+     echo "I:test ${t} failed"
+     status=1
+}
 
 # Check CLIENT-IP behavior
 t=`expr $t + 1`