From: Mark Andrews Date: Fri, 15 Oct 2021 06:42:45 +0000 (+1100) Subject: Extend checking of synthesised respones X-Git-Tag: v9.17.21~5^2~33 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=48f1f5187048a63fc3ca39fffc42a9edd194ede9;p=thirdparty%2Fbind9.git Extend checking of synthesised respones add digcomp checks to cover wildcard and cname wildcard case (nxdomain and nodata already covered) --- diff --git a/bin/tests/system/synthfromdnssec/clean.sh b/bin/tests/system/synthfromdnssec/clean.sh index 64d6ac63311..2fc1361baf4 100644 --- a/bin/tests/system/synthfromdnssec/clean.sh +++ b/bin/tests/system/synthfromdnssec/clean.sh @@ -28,3 +28,7 @@ rm -f ./ns1/root.db.signed rm -f ./ns1/trusted.conf rm -f ./ns2/named_dump.db rm -f ./ns*/managed-keys.bind* +rm -f ./nodata.out +rm -f ./nxdomain.out +rm -f ./wild.out +rm -f ./wildcname.out diff --git a/bin/tests/system/synthfromdnssec/tests.sh b/bin/tests/system/synthfromdnssec/tests.sh index ab11cdd7369..0c88583f159 100644 --- a/bin/tests/system/synthfromdnssec/tests.sh +++ b/bin/tests/system/synthfromdnssec/tests.sh @@ -91,7 +91,7 @@ do check_ad_flag yes dig.out.ns${ns}.test$n || ret=1 check_status NXDOMAIN dig.out.ns${ns}.test$n || ret=1 check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1 - [ $ns -eq 2 ] && nxdomain=dig.out.ns${ns}.test$n + [ $ns -eq 2 ] && cp dig.out.ns${ns}.test$n nxdomain.out n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -102,7 +102,7 @@ do check_ad_flag yes dig.out.ns${ns}.test$n || ret=1 check_status NOERROR dig.out.ns${ns}.test$n || ret=1 check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1 - [ $ns -eq 2 ] && nodata=dig.out.ns${ns}.test$n + [ $ns -eq 2 ] && cp dig.out.ns${ns}.test$n nodata.out n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -113,6 +113,7 @@ do check_ad_flag yes dig.out.ns${ns}.test$n || ret=1 check_status NOERROR dig.out.ns${ns}.test$n || ret=1 check_nosynth_a a.wild-a.example. dig.out.ns${ns}.test$n || ret=1 + [ $ns -eq 2 ] && sed 's/^a\./b./' dig.out.ns${ns}.test$n > wild.out n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -123,6 +124,7 @@ do check_ad_flag yes dig.out.ns${ns}.test$n || ret=1 check_status NOERROR dig.out.ns${ns}.test$n || ret=1 check_nosynth_cname a.wild-cname.example. dig.out.ns${ns}.test$n || ret=1 + [ $ns -eq 2 ] && sed 's/^a\./b./' dig.out.ns${ns}.test$n > wildcname.out n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -165,7 +167,7 @@ do check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1 nextpart ns1/named.run | grep b.example/A > /dev/null || ret=1 fi - digcomp $nxdomain dig.out.ns${ns}.test$n || ret=1 + digcomp nxdomain.out dig.out.ns${ns}.test$n || ret=1 n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -184,7 +186,7 @@ do check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1 nextpart ns1/named.run | grep nodata.example/AAAA > /dev/null || ret=1 fi - digcomp $nodata dig.out.ns${ns}.test$n || ret=1 + digcomp nodata.out dig.out.ns${ns}.test$n || ret=1 n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -203,6 +205,7 @@ do check_nosynth_a b.wild-a.example. dig.out.ns${ns}.test$n || ret=1 nextpart ns1/named.run | grep b.wild-a.example/A > /dev/null || ret=1 fi + digcomp wild.out dig.out.ns${ns}.test$n || ret=1 n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret)) @@ -222,6 +225,7 @@ do nextpart ns1/named.run | grep b.wild-cname.example/A > /dev/null || ret=1 fi grep "ns1.example.*.IN.A" dig.out.ns${ns}.test$n > /dev/null || ret=1 + digcomp wildcname.out dig.out.ns${ns}.test$n || ret=1 n=$((n+1)) if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status+ret))