From: Alessio Podda Date: Wed, 17 Jun 2026 11:40:23 +0000 (+0200) Subject: Add test for query statistics X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1cb775e95ecb8c5081e5eeff933f4b2f68d5c9c;p=thirdparty%2Fbind9.git Add test for query statistics Ensure that no per-zone glue statistic is printed unless zone-statistics is set to full. --- diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index 71187a5fe3c..5306341c305 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -358,22 +358,26 @@ echo_i "Check that 'zone-statistics full;' is processed by 'rndc reconfig' ($n)" ret=0 # off by default rndc_stats ns2 10.53.0.2 || ret=1 -sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=0 +sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=1 +sed -n '/Per Zone Glue Cache Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=1 # turn on cp ns2/named2.conf ns2/named.conf rndc_reconfig ns2 10.53.0.2 rndc_stats ns2 10.53.0.2 || ret=1 sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null || ret=1 +sed -n '/Per Zone Glue Cache Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null || ret=1 # turn off cp ns2/named1.conf ns2/named.conf rndc_reconfig ns2 10.53.0.2 rndc_stats ns2 10.53.0.2 || ret=1 -sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=0 +sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=1 +sed -n '/Per Zone Glue Cache Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null && ret=1 # turn on cp ns2/named2.conf ns2/named.conf rndc_reconfig ns2 10.53.0.2 rndc_stats ns2 10.53.0.2 || ret=1 sed -n '/Per Zone Query Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null || ret=1 +sed -n '/Per Zone Glue Cache Statistics/,/^++/p' $last_stats | grep -F '[example]' >/dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) n=$((n + 1))