From: Mark Andrews Date: Fri, 9 May 2014 05:00:36 +0000 (+1000) Subject: use sub second sleeps for prefetch disabled test X-Git-Tag: v9.10.1b1~102 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2555e488ede3b1b1cc9ef9d372f4f4b6a9305ebb;p=thirdparty%2Fbind9.git use sub second sleeps for prefetch disabled test (cherry picked from commit 733898cffeda261c5d41a7ed38a3c5e5d5082865) --- diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 3757715f4cb..075c49d6126 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -441,12 +441,13 @@ ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 1 }' dig.out.1.${n}` # sleep so we are in expire range sleep ${ttl1:-0} # look for zero ttl, allow for one miss at getting zero ttl -for i in 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 +zerotonine="0 1 2 3 4 5 6 7 8 9" +for i in $zerotonine $zerotonine $zerotonine $zerotonine do $DIG @10.53.0.7 -p 5300 fetch.example.net txt > dig.out.2.${n} || ret=1 ttl2=`awk '/"A" "short" "ttl"/ { print $2 }' dig.out.2.${n}` test ${ttl2:-1} -eq 0 && break - sleep 1 + $PERL -e 'select(undef, undef, undef, 0.05);' done test ${ttl2:-1} -eq 0 || ret=1 # delay so that any prefetched record will have a lower ttl than expected