Commit ca44fe49 authored by Brian Wellington's avatar Brian Wellington
Browse files

Add a system test for records with unknown types/classes. There are probably

a lot more things that could be tested here.
parent 0b768043
......@@ -15,6 +15,7 @@ involving a different DNS setup. They are:
resolver/ Regression tests for resolver bugs that have been fixed
(not a complete resolver test suite)
stub/ Tests of stub zone functionality
unknown/ Unknown type and class tests
upforwd/ Update forwarding tests
views/ Tests of the "views" statement
xfer/ Zone transfer, update, and NOTIFY tests
......@@ -47,4 +48,4 @@ The tests can be run individually like this:
To run all the tests, just type "make test".
$Id: README,v 1.7 2000/09/19 00:40:14 gson Exp $
$Id: README,v 1.8 2000/11/10 03:05:49 bwelling Exp $
......@@ -15,7 +15,7 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: conf.sh.in,v 1.15 2000/09/16 01:42:06 gson Exp $
# $Id: conf.sh.in,v 1.16 2000/11/10 03:05:50 bwelling Exp $
#
# Common configuration data for system tests, to be sourced into
......@@ -40,7 +40,7 @@ SIGNER=$TOP/bin/dnssec/dnssec-signzone
KEYSIGNER=$TOP/bin/dnssec/dnssec-signkey
KEYSETTOOL=$TOP/bin/dnssec/dnssec-makekeyset
SUBDIRS="dnssec forward glue limits lwresd notify nsupdate resolver stub \
upforwd views xfer xferquota"
unknown upforwd views xfer xferquota"
# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@
......
#!/bin/sh
# Copyright (C) 2000 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.1 2000/11/10 03:05:52 bwelling Exp $
rm -f dig.out
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: broken1.db,v 1.1 2000/11/10 03:05:53 bwelling Exp $
$TTL 300 ; 5 minutes
@ SOA mname1. . (
2000062101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A 10.53.0.1
a A \# 5 0A000001
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: broken2.db,v 1.1 2000/11/10 03:05:53 bwelling Exp $
$TTL 300 ; 5 minutes
@ SOA mname1. . (
2000062101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A 10.53.0.1
a A \# 4 0A00000100
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: broken3.db,v 1.1 2000/11/10 03:05:53 bwelling Exp $
$TTL 300 ; 5 minutes
@ SOA mname1. . (
2000062101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A 10.53.0.1
a A \# 5 0A00000100
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: class10.hints,v 1.1 2000/11/10 03:05:53 bwelling Exp $
$TTL 3600
. NS ns.
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: example-class10.db,v 1.1 2000/11/10 03:05:53 bwelling Exp $
$TTL 300 ; 5 minutes
@ SOA mname1. . (
2000062101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
a1 A \# 4 0A000001
a2 CLASS10 A \# 4 0A000001
txt1 TXT \# 6 0568656C6C6F
txt2 TXT "hello"
txt3 CLASS10 TXT \# 6 0568656C6C6F
txt4 CLASS10 TXT "hello"
unk1 TYPE123 \# 1 00
unk2 CLASS10 TYPE123 \# 1 00
; Copyright (C) 2000 Internet Software Consortium.
;
; Permission to use, copy, modify, and distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
; DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
; INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
; FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
; $Id: example-in.db,v 1.1 2000/11/10 03:05:54 bwelling Exp $
$TTL 300 ; 5 minutes
@ SOA mname1. . (
2000062101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A 10.53.0.1
a1 A \# 4 0A000001
a2 A \# 4 0A 00 00 01
a3 CLASS1 A 10.0.0.1
a4 CLASS1 A \# 4 0A000001
a5 TYPE1 10.0.0.1
a6 TYPE1 \# 4 0A000001
a7 CLASS1 TYPE1 10.0.0.1
a8 CLASS1 TYPE1 \# 4 0A000001
a9 IN TYPE1 10.0.0.1
a10 IN TYPE1 \# 4 0A000001
txt1 IN TXT "hello"
txt2 CLASS1 TXT "hello"
txt3 IN TYPE16 "hello"
txt4 CLASS1 TYPE16 "hello"
txt5 TXT \# 6 0568656C6C6F
txt6 TYPE16 \# 6 0568656C6C6F
unk1 TYPE123 \# 1 00
unk2 CLASS1 TYPE123 \# 1 00
unk3 IN TYPE123 \# 1 00
/*
* Copyright (C) 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.1 2000/11/10 03:05:54 bwelling Exp $ */
options {
query-source address 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 {none;};
recursion no;
notify no;
};
view "in" {
zone "example." {
type master;
file "example-in.db";
};
zone "broken1." {
type master;
file "broken1.db";
};
zone "broken2." {
type master;
file "broken2.db";
};
zone "broken3." {
type master;
file "broken3.db";
};
};
view "class10" class10 {
zone "." class10 {
type hint;
file "class10.hints";
};
zone "example." class10 {
type master;
file "example-class10.db";
};
};
#!/bin/sh
# Copyright (C) 2000 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.1 2000/11/10 03:05:52 bwelling Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
#
# Perform tests
#
status=0
DIGOPTS="@10.53.0.1 -p 5300"
echo "I:querying for various representations of an IN A record"
for i in 1 2 3 4 5 6 7 8 9 10
do
ret=0
$DIG +short $DIGOPTS a$i.example a in > dig.out || ret=1
echo 10.0.0.1 | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for various representations of an IN TXT record"
for i in 1 2 3 4 5 6
do
ret=0
$DIG +short $DIGOPTS txt$i.example txt in > dig.out || ret=1
echo '"hello"' | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for various representations of an IN TYPE123 record"
for i in 1 2 3
do
ret=0
$DIG +short $DIGOPTS unk$i.example type123 in > dig.out || ret=1
echo '\# 1 00' | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for various representations of a CLASS10 TYPE1 record"
for i in 1 2
do
ret=0
$DIG +short $DIGOPTS a$i.example a class10 > dig.out || ret=1
echo '\# 4 0A000001' | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for various representations of a CLASS10 TXT record"
for i in 1 2 3 4
do
ret=0
$DIG +short $DIGOPTS txt$i.example txt class10 > dig.out || ret=1
echo '"hello"' | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for various representations of a CLASS10 TYPE123 record"
for i in 1 2
do
ret=0
$DIG +short $DIGOPTS unk$i.example type123 class10 > dig.out || ret=1
echo '\# 1 00' | diff - dig.out || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:querying for SOAs of zone that should have failed to load"
for i in 1 2 3
do
ret=0
$DIG $DIGOPTS broken$i. soa in > dig.out || ret=1
grep "SERVFAIL" dig.out > /dev/null || ret=1
if [ $ret != 0 ]
then
echo "#$i failed"
fi
status=`expr $status + $ret`
done
echo "I:exit status: $status"
exit $status
......@@ -484,6 +484,16 @@
./bin/tests/system/stub/ns3/root.hint ZONE 2000
./bin/tests/system/stub/tests.sh SH 2000
./bin/tests/system/testsock.pl PERL 2000
./bin/tests/system/unknown/ns1/.cvsignore X 2000
./bin/tests/system/unknown/clean.sh SH 2000
./bin/tests/system/unknown/ns1/broken1.db ZONE 2000
./bin/tests/system/unknown/ns1/broken2.db ZONE 2000
./bin/tests/system/unknown/ns1/broken3.db ZONE 2000
./bin/tests/system/unknown/ns1/class10.hints ZONE 2000
./bin/tests/system/unknown/ns1/example-class10.db ZONE 2000
./bin/tests/system/unknown/ns1/example-in.db ZONE 2000
./bin/tests/system/unknown/ns1/named.conf CONF-C 2000
./bin/tests/system/unknown/tests.sh SH 2000
./bin/tests/system/upforwd/README TXT.BRIEF 2000
./bin/tests/system/upforwd/clean.sh SH 2000
./bin/tests/system/upforwd/knowngood.ns1.after X 2000
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment