From: Mark Andrews Date: Thu, 28 Oct 2021 02:18:27 +0000 (+1100) Subject: Check reported synthesized responses in named.stats X-Git-Tag: v9.17.21~5^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98cab762950b0f6b734160038e0f80097eb89627;p=thirdparty%2Fbind9.git Check reported synthesized responses in named.stats --- diff --git a/bin/tests/system/synthfromdnssec/tests.sh b/bin/tests/system/synthfromdnssec/tests.sh index 0970a07255d..51db3e97ed2 100644 --- a/bin/tests/system/synthfromdnssec/tests.sh +++ b/bin/tests/system/synthfromdnssec/tests.sh @@ -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 ;) ($n)"