added 'masterfile' system test to make sure

rt #1558 does not happen again
This commit is contained in:
Andreas Gustafsson
2001-08-01 19:01:02 +00:00
parent 23a020bc13
commit e0315f2160
11 changed files with 212 additions and 3 deletions

View File

@@ -0,0 +1 @@
dig.out

View File

@@ -0,0 +1,20 @@
#!/bin/sh
#
# Copyright (C) 2001 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 2001/08/01 19:01:01 gson Exp $
rm -f dig.out

View File

@@ -0,0 +1,40 @@
; <<>> DiG 9.2.0b2 <<>> +nostats include. axfr @10.53.0.1 -p 5300
;; global options: printcmd
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
include. 300 IN NS ns.include.
a.include. 300 IN A 10.0.0.1
a.include. 300 IN A 10.0.0.99
a.a.include. 300 IN A 10.0.1.1
b.foo.a.include. 300 IN A 10.0.2.2
b.include. 300 IN A 10.0.0.2
b.include. 300 IN A 10.0.0.99
a.b.include. 300 IN A 10.0.1.1
c.b.include. 300 IN A 10.0.0.3
b.foo.b.include. 300 IN A 10.0.2.2
ns.include. 300 IN A 127.0.0.1
include. 300 IN SOA ns.include. hostmaster.include. 1 3600 1800 1814400 3600
; <<>> DiG 9.2.0b2 <<>> +nostats ttl2. axfr @10.53.0.1 -p 5300
;; global options: printcmd
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
ttl2. 1 IN NS ns.ttl2.
a.ttl2. 1 IN TXT "inherited ttl 1"
b.ttl2. 2 IN TXT "explicit ttl 2"
c.ttl2. 2 IN TXT "inherited ttl 2"
d.ttl2. 3 IN TXT "default ttl 3"
e.ttl2. 2 IN TXT "explicit ttl 2"
f.ttl2. 3 IN TXT "default ttl 3"
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
; <<>> DiG 9.2.0b2 <<>> +nostats ttl2. axfr @10.53.0.1 -p 5300
;; global options: printcmd
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3
ttl2. 1 IN NS ns.ttl2.
a.ttl2. 1 IN TXT "inherited ttl 1"
b.ttl2. 2 IN TXT "explicit ttl 2"
c.ttl2. 2 IN TXT "inherited ttl 2"
d.ttl2. 3 IN TXT "default ttl 3"
e.ttl2. 2 IN TXT "explicit ttl 2"
f.ttl2. 3 IN TXT "default ttl 3"
ttl2. 1 IN SOA ns.ttl2. hostmaster.ttl2. 1 3600 1800 1814400 3

View File

@@ -0,0 +1 @@
named.run

View File

@@ -0,0 +1,25 @@
; Test $INCLUDE current domain name and origin semantics
$TTL 300
@ IN SOA ns hostmaster (
1 ; serial
3600
1800
1814400
3600
)
NS ns
ns A 127.0.0.1
a A 10.0.0.1
$INCLUDE sub.db a
; use the current domain name
A 10.0.0.99
b A 10.0.0.2
$ORIGIN b
$INCLUDE sub.db
; use the current domain name
A 10.0.0.99
c A 10.0.0.3

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2000, 2001 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 2001/08/01 19:01:02 gson Exp $ */
options {
query-source address 10.53.0.1;
notify-source 10.53.0.1;
transfer-source 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
listen-on-v6 { none; };
recursion no;
notify yes;
};
zone "include" {
type master;
file "include.db";
};
zone "ttl1" {
type master;
file "ttl1.db";
};
zone "ttl2" {
type master;
file "ttl2.db";
};

View File

@@ -0,0 +1,4 @@
a A 10.0.1.1
$ORIGIN foo
b A 10.0.2.2

View File

@@ -0,0 +1,16 @@
@ IN SOA ns hostmaster (
1 ; serial
3600
1800
1814400
3
)
NS ns
a TXT "soa minttl 3"
b 2 TXT "explicit ttl 2"
c TXT "soa minttl 3"
$TTL 1
d TXT "default ttl 1"
e 4 TXT "explicit ttl 4"
f TXT "default ttl 1"

View File

@@ -0,0 +1,19 @@
@ 1 IN SOA ns hostmaster (
1 ; serial
3600
1800
1814400
3
)
NS ns
a TXT "inherited ttl 1"
b 2 TXT "explicit ttl 2"
c TXT "inherited ttl 2"
$TTL 3
d TXT "default ttl 3"
e 2 TXT "explicit ttl 2"
f TXT "default ttl 3"

View File

@@ -0,0 +1,37 @@
#!/bin/sh
#
# Copyright (C) 2001 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 2001/08/01 19:01:01 gson Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
echo "I:test master file \$INCLUDE semantics"
$DIG +nostats include. axfr @10.53.0.1 -p 5300 >dig.out
echo "I:test master file BIND 8 compatibility TTL and \$TTL semantics"
$DIG +nostats ttl2. axfr @10.53.0.1 -p 5300 >>dig.out
echo "I:test of master file RFC1035 TTL and \$TTL semantics"
$DIG +nostats ttl2. axfr @10.53.0.1 -p 5300 >>dig.out
diff dig.out knowngood.dig.out || status=1
echo "I:exit status: $status"
exit $status