From a41ab607a452e2e90ae0cb142a0a985e4fda2fbd Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Tue, 20 Feb 2001 18:33:50 +0000 Subject: [PATCH] Test that validation of ANY queries works. Also add data to be used for CNAME/DNAME tests, but not the tests yet since they fail. --- bin/tests/system/dnssec/ns2/example.db.in | 20 +++++++++++++++++++- bin/tests/system/dnssec/tests.sh | 16 ++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/dnssec/ns2/example.db.in b/bin/tests/system/dnssec/ns2/example.db.in index 51fc3b9c41..6378c9f8c1 100644 --- a/bin/tests/system/dnssec/ns2/example.db.in +++ b/bin/tests/system/dnssec/ns2/example.db.in @@ -13,7 +13,7 @@ ; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION ; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -; $Id: example.db.in,v 1.7 2001/01/09 21:42:50 bwelling Exp $ +; $Id: example.db.in,v 1.8 2001/02/20 18:33:50 bwelling Exp $ $TTL 300 ; 5 minutes @ IN SOA mname1. . ( @@ -32,6 +32,24 @@ a A 10.0.0.1 b A 10.0.0.2 d A 10.0.0.4 +; Used for testing ANY queries +foo TXT "testing" +foo A 10.0.1.0 + +; Used for testing CNAME queries +cname1 CNAME cname1-target +cname1-target TXT "testing cname" + +cname2 CNAME cname2-target +cname2-target TXT "testing cname" + +; Used for testing DNAME queries +dname1 DNAME dname1-target +foo.dname1-target TXT "testing dname" + +dname2 DNAME dname2-target +foo.dname2-target TXT "testing dname" + ; A secure subdomain secure NS ns.secure ns.secure A 10.53.0.3 diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 942f96c3a6..ca5d0b3730 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.29 2001/01/09 21:42:45 bwelling Exp $ +# $Id: tests.sh,v 1.30 2001/02/20 18:33:49 bwelling Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -89,7 +89,7 @@ status=`expr $status + $ret` echo "I:checking failed validation ($n)" ret=0 $DIG $DIGOPTS a.bogus.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1 -grep "SERVFAIL" dig.out.ns4.test$n > /dev/null > /dev/null || ret=1 +grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1 n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` @@ -220,5 +220,17 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I:checking that validation of an ANY query works ($n)" +ret=0 +$DIG $DIGOPTS +noauth foo.example. any @10.53.0.2 > dig.out.ns2.test$n || ret=1 +$DIG $DIGOPTS +noauth foo.example. any @10.53.0.4 > dig.out.ns4.test$n || ret=1 +$PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1 +grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1 +# 2 records in the zone, 1 NXT, 3 SIGs +grep "ANSWER: 6" dig.out.ns4.test$n > /dev/null || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status