]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check 'rndc stats' output for 'cache NSEC auxiliary database nodes'
authorMark Andrews <marka@isc.org>
Thu, 28 Oct 2021 02:28:11 +0000 (13:28 +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 be5472bddbdc253a25b5ec5f66b3201548183edc..125daf5f418d74c61e16b6894a4dfb55ef069e74 100644 (file)
@@ -405,6 +405,22 @@ do
     if [ $ret != 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
 
+    echo_i "check 'rndc stats' output for 'cache NSEC auxiliary database nodes' (synth-from-dnssec ${description};) ($n)"
+    ret=0
+    # 2 views, _bind should always be '0 cache NSEC auxiliary database nodes'
+    count=$(grep "cache NSEC auxiliary database nodes" ns${ns}/named.stats | wc -l)
+    test $count = 2 || ret=1
+    zero=$(grep "0 cache NSEC auxiliary database nodes" ns${ns}/named.stats | wc -l)
+    if [ ${ad} = yes ]
+    then
+       test $zero = 1 || ret=1
+    else
+       test $zero = 2 || ret=1
+    fi
+    n=$((n+1))
+    if [ $ret != 0 ]; then echo_i "failed"; fi
+    status=$((status+ret))
+
     for synthesized in NXDOMAIN no-data wildcard
     do
        case $synthesized in