]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check reported synthesized responses in named.stats
authorMark Andrews <marka@isc.org>
Thu, 28 Oct 2021 02:18:27 +0000 (13:18 +1100)
committerPetr Špaček <pspacek@isc.org>
Thu, 2 Dec 2021 13:18:41 +0000 (14:18 +0100)
bin/tests/system/synthfromdnssec/tests.sh

index 0970a07255d7a37f0aee2c09858a785883726f9b..51db3e97ed2809275dd09926ffec28263e87c8a3 100644 (file)
@@ -405,6 +405,25 @@ do
     if [ $ret != 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
 
+    for synthesized in NXDOMAIN no-data wildcard
+    do
+       case $synthesized in
+       NXDOMAIN) count=1;;
+       no-data) count=2;;
+       wildcard) count=2;;
+       esac
+       echo_i "check 'rndc stats' output for 'synthesized a ${synthesized} response' (synth-from-dnssec ${description};) ($n)"
+       ret=0
+       if [ ${synth} = yes ]
+       then
+           grep "$count synthesized a ${synthesized} response" ns${ns}/named.stats > /dev/null || ret=1
+       else
+           grep "synthesized a ${synthesized} response" ns${ns}/named.stats > /dev/null && ret=1
+       fi
+       n=$((n+1))
+       if [ $ret != 0 ]; then echo_i "failed"; fi
+       status=$((status+ret))
+   done
 done
 
 echo_i "check redirect response (+dnssec) (synth-from-dnssec <default>;) ($n)"