]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix 'checking drop statistics' test
authorMark Andrews <marka@isc.org>
Tue, 28 Feb 2023 03:24:20 +0000 (14:24 +1100)
committerMark Andrews <marka@isc.org>
Tue, 28 Feb 2023 12:26:45 +0000 (12:26 +0000)
Wait for the desired log message to appear in ns3/named.stats rather
than the creation of the file.

(cherry picked from commit c7ae975ecf70fb6fc7c836f39b7f1ab4f2fe0129)

bin/tests/system/fetchlimit/clean.sh
bin/tests/system/fetchlimit/tests.sh

index f0158b171097f9c108c64390bd681764c10b590a..935d91bba8d2a50412a34af400286e5b113c3bb0 100644 (file)
@@ -12,8 +12,8 @@
 # information regarding copyright ownership.
 
 rm -f */named.conf */named.memstats */ans.run */named.recursing */named.run
-rm -f dig.out*
 rm -f ans4/norespond
-rm -f ns3/named.stats ns3/named_dump.db
 rm -f burst.input.*
+rm -f dig.out*
 rm -f ns*/managed-keys.bind*
+rm -f ns3/named.stats ns3/named.stats.prev ns3/named_dump.db
index d34a817ad3c3ecbb0e0ce5b2261b339d2d98488f..d94539290b213f915aed71f288793c8d0f66dfcc 100644 (file)
@@ -185,11 +185,9 @@ status=$((status+ret))
 
 echo_i "checking drop statistics"
 rm -f ns3/named.stats
+touch ns3/named.stats
 $RNDCCMD stats
-for try in 1 2 3 4 5; do
-    [ -f ns3/named.stats ] && break
-    sleep 1
-done
+wait_for_log 5 "queries dropped due to recursive client limit" ns3/named.stats || ret=1
 drops=`grep 'queries dropped due to recursive client limit' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
 [ "${drops:-0}" -ne 0 ] || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi