Extend checking of synthesised respones

add digcomp checks to cover wildcard and cname wildcard case
(nxdomain and nodata already covered)
This commit is contained in:
Mark Andrews
2021-10-15 17:42:45 +11:00
committed by Petr Špaček
parent 89542b8a15
commit 48f1f51870
2 changed files with 12 additions and 4 deletions

View 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))