mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-16 14:22:51 -04:00
Add test for query statistics
Ensure that no per-zone glue statistic is printed unless
zone-statistics is set to full.
(cherry picked from commit e1cb775e95)
This commit is contained in:
parent
a5bc4955c7
commit
97e73e4a57
1 changed files with 6 additions and 2 deletions
|
|
@ -256,22 +256,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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue