Commit e7ddc97b authored by Mark Andrews's avatar Mark Andrews

Add stub test

parent 93813148
#!/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.
#
# Clean up after zone transfer tests.
#
rm -f ns2/child.example.st dig.out.ns2
; <<>> DiG 8.2 <<>> -p @10.53.0.3 +norec data.child.example txt
; (1 server found)
;; res options: init defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 216
;; flags: qr ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; QUERY SECTION:
;; data.child.example, type = TXT, class = IN
;; AUTHORITY SECTION:
child.example. 5M IN NS ns2.child.example.
;; ADDITIONAL SECTION:
ns2.child.example. 5M IN A 10.53.0.2
;; Total query time: 3 msec
;; FROM: draco to SERVER: 10.53.0.3
;; WHEN: Wed Jun 21 10:58:37 2000
;; MSG SIZE sent: 36 rcvd: 70
; <<>> DiG 8.2 <<>> -p @10.53.0.3 data.child.example txt
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUERY SECTION:
;; data.child.example, type = TXT, class = IN
;; ANSWER SECTION:
data.child.example. 5M IN TXT "some" "test" "data"
;; AUTHORITY SECTION:
child.example. 5M IN NS ns2.child.example.
;; ADDITIONAL SECTION:
ns2.child.example. 5M IN A 10.53.0.2
;; Total query time: 8 msec
;; FROM: draco to SERVER: 10.53.0.3
;; WHEN: Wed Jun 21 10:58:54 2000
;; MSG SIZE sent: 36 rcvd: 97
options {
query-source address 10.53.0.1;
port 5300;
directory ".";
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 {none;};
recursion no;
notify yes;
};
zone "." {
type master;
file "root.db";
};
$TTL 300
. IN SOA gson.nominum.com. a.root.servers.nil. (
2000042100 ; serial
600 ; refresh
600 ; retry
1200 ; expire
600 ; minimum
)
. NS a.root-servers.nil.
a.root-servers.nil. A 10.53.0.1
example. NS ns3.example.
ns3.example. A 10.53.0.3
$TTL 300 ; 5 minutes
child.example. IN SOA ns2.child.example. hostmaster.child.example. (
2000042795 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
child.example. NS ns2.child.example.
ns2.child.example. A 10.53.0.2
data TXT some test data
options {
query-source address 10.53.0.2;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.2; };
listen-on-v6 {none;};
recursion no;
notify yes;
};
zone "." {
type hint;
file "root.hint";
};
zone "child.example" {
type master;
file "child.example.db";
};
$TTL 999999
. IN NS a.root-servers.nil.
a.root-servers.nil. IN A 10.53.0.1
$ORIGIN .
$TTL 300 ; 5 minutes
example IN SOA ns3.example. hostmaster.example. (
2000042795 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
example. NS ns3.example.
ns3.example. A 10.53.0.3
options {
query-source address 10.53.0.3;
port 5300;
directory ".";
pid-file "named.pid";
listen-on { 10.53.0.3; };
listen-on-v6 {none;};
recursion yes;
notify yes;
};
zone "." {
type hint;
file "root.hint";
};
zone "example" {
type master;
file "example.db";
};
zone "child.example" {
type stub;
file "child.example.st";
masters { 10.53.0.2; };
};
$TTL 999999
. IN NS a.root-servers.nil.
a.root-servers.nil. IN A 10.53.0.1
#!/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.
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
#
# Perform tests
#
# sleep 5
status=0;
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd data.child.example. \
@10.53.0.3 axfr -p 5300 > dig.out.ns3
status=`expr $status + $?`
grep "; Transfer failed." dig.out.ns3
status=`expr $status + $?`
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +norec \
data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3
status=`expr $status + $?`
$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd +rec \
data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3
status=`expr $status + $?`
$PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3
status=`expr $status + $?`
if [ $status != 0 ]; then
echo "R:FAIL"
else
echo "R:PASS"
fi
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