]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Extend checking of synthesised respones
authorMark Andrews <marka@isc.org>
Fri, 15 Oct 2021 06:42:45 +0000 (17:42 +1100)
committerPetr Špaček <pspacek@isc.org>
Thu, 2 Dec 2021 13:18:40 +0000 (14:18 +0100)
add digcomp checks to cover wildcard and cname wildcard case
(nxdomain and nodata already covered)

bin/tests/system/synthfromdnssec/clean.sh
bin/tests/system/synthfromdnssec/tests.sh

index 64d6ac63311565ed5a533a281d032511ea11ad9a..2fc1361baf416e4b5c191243a3f5aa4cffe982be 100644 (file)
@@ -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
index ab11cdd7369aa69005187c5909dcef5be6801e7d..0c88583f1590ce6923b49052ed59bcb0b8a967b3 100644 (file)
@@ -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))