]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check 'rndc recursing'
authorEvan Hunt <each@isc.org>
Sat, 12 Oct 2024 03:19:02 +0000 (20:19 -0700)
committerEvan Hunt <each@isc.org>
Mon, 14 Oct 2024 19:59:52 +0000 (12:59 -0700)
there was no system test that exercised 'rndc recursing'; a
simple one has now been added; it confirms that the number of
recursing clients reported by 'rndc stats' is in agreement with
the list returned by 'rndc recursing'.

bin/tests/system/statistics/clean.sh
bin/tests/system/statistics/tests.sh

index a1fc8d0288302d2775cf3798be47f05bf8ef3a5e..ac11bce7db95e4c3d1ce653e40507595d8b53bb2 100644 (file)
@@ -28,4 +28,4 @@ rm -f curl.out.*
 rm -f stats*out
 rm -f ns*/managed-keys.bind*
 rm -f xsltproc.out.*
-rm -f named.stats.* ns*/named.stats.*
+rm -f named.stats.* ns*/named.stats.* ns*/named.recursing
index a840d9e27b0a4e709b7a0770a8672c3f931907dc..5f2a7196721783735b680de7e707beaae2fe60a2 100644 (file)
@@ -98,6 +98,10 @@ getstats() {
   grep "2 recursing clients" $last_stats >/dev/null || return 1
 }
 retry_quiet 5 getstats || ret=1
+# confirm agreement with 'rndc recursing'
+$RNDCCMD -s 10.53.0.3 recursing || ret=1
+lines=$(grep -c "; client .*(tcp)" ns3/named.recursing || true)
+[ "$lines" -eq 2 ] || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 n=$((n + 1))