From 74f53a003232aad923ed7f88759d6809fbd66fcb Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 11 Oct 2024 20:19:02 -0700 Subject: [PATCH] check 'rndc recursing' 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 | 2 +- bin/tests/system/statistics/tests.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/statistics/clean.sh b/bin/tests/system/statistics/clean.sh index a1fc8d0288..ac11bce7db 100644 --- a/bin/tests/system/statistics/clean.sh +++ b/bin/tests/system/statistics/clean.sh @@ -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 diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index a840d9e27b..5f2a719672 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -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))