From: Mark Andrews Date: Wed, 3 Jan 2018 02:54:26 +0000 (+1100) Subject: wait for status: line to be readable, before checking status X-Git-Tag: v9.11.3b1~59 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=455265a1475460fc421dd64a2902bb3132f0ab03;p=thirdparty%2Fbind9.git wait for status: line to be readable, before checking status (cherry picked from commit 46741274436a909f6cecf068b3eeb12f11753f54) --- diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index 799b5f66207..ecd306dcecf 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -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`