+4908. [test] Eliminated unnecessary waiting in the allow_query
+ system test. Also changed its name to allow-query.
+ [GL #81]
+
4907. [test] Improved the reliabilty of the 'notify' system
test. [GL #59]
# used.
# Define the tests that can be run in parallel. This should be identical to
-# the definition of PARALLELDIRS in conf.sh. Note: long-running tests
-# such as allow_query and serve-stale are scheduled first to get more
+# the definition of PARALLELDIRS in conf.sh. Note: longer-running tests
+# such as serve-stale and rpzrecurse stale are scheduled first to get more
# benefit from parallelism.
-
-PARALLEL = allow-query rpzrecurse serve-stale \
- acl additional addzone auth autosign \
+PARALLEL = rpzrecurse serve-stale dnssec \
+ acl additional addzone allow-query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
cookie database digdelv dlv dlz dlzexternal \
- dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
+ dns64 @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue inline integrity ixfr keepalive \
rm -f ns2/named.conf ns2/controls.conf
rm -f */named.memstats
rm -f ns*/named.lock
-rm -f ns*/named.run
+rm -f ns*/named.run ns*/named.run.prev
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN acldisallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.9.1
-mail A 10.0.9.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN aclnotallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.8.1
-mail A 10.0.8.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN added.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.0.1
-mail A 10.0.0.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN addrallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.4.1
-mail A 10.0.4.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN addrdisallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.6.1
-mail A 10.0.6.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN addrnotallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.5.1
-mail A 10.0.5.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN any.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.1.1
-mail A 10.0.1.2
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
-$ORIGIN aclallow.example.
+$ORIGIN @
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
1 ; serial
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN keyallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.10.1
-mail A 10.0.10.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN keydisallow.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.12.1
-mail A 10.0.12.2
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "any.example" {
type master;
- file "any.db";
+ file "generic.db";
allow-query { any; };
};
zone "none.example" {
type master;
- file "none.db";
+ file "generic.db";
allow-query { none; };
};
zone "addrallow.example" {
type master;
- file "addrallow.db";
+ file "generic.db";
allow-query { 10.53.0.2; };
};
zone "addrnotallow.example" {
type master;
- file "addrnotallow.db";
+ file "generic.db";
allow-query { 10.53.0.1; };
};
zone "addrdisallow.example" {
type master;
- file "addrdisallow.db";
+ file "generic.db";
allow-query { ! 10.53.0.2; };
};
zone "aclallow.example" {
type master;
- file "aclallow.db";
+ file "generic.db";
allow-query { accept; };
};
zone "aclnotallow.example" {
type master;
- file "aclnotallow.db";
+ file "generic.db";
allow-query { badaccept; };
};
zone "acldisallow.example" {
type master;
- file "acldisallow.db";
+ file "generic.db";
allow-query { ! accept; };
};
/* Also usable for testing key not allowed */
zone "keyallow.example" {
type master;
- file "keyallow.db";
+ file "generic.db";
allow-query { key one; };
};
zone "keydisallow.example" {
type master;
- file "keydisallow.db";
+ file "generic.db";
allow-query { ! key one; };
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
allow-query { any; };
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
allow-query { none; };
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
allow-query { any; };
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
allow-query { none; };
};
};
zone "normal.example" {
type master;
- file "normal.db";
+ file "generic.db";
};
zone "aclnotallow.example" {
type master;
- file "aclnotallow.db";
+ file "generic.db";
allow-query-on { none; };
};
};
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN none.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.2.1
-mail A 10.0.2.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN normal.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.0.1
-mail A 10.0.0.2
+++ /dev/null
-; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-;
-; This Source Code Form is subject to the terms of the Mozilla Public
-; License, v. 2.0. If a copy of the MPL was not distributed with this
-; file, You can obtain one at http://mozilla.org/MPL/2.0/.
-;
-; See the COPYRIGHT file distributed with this work for additional
-; information regarding copyright ownership.
-
-$ORIGIN previous.example.
-$TTL 300 ; 5 minutes
-@ IN SOA mname1. . (
- 1 ; serial
- 20 ; refresh (20 seconds)
- 20 ; retry (20 seconds)
- 1814400 ; expire (3 weeks)
- 3600 ; minimum (1 hour)
- )
- NS ns2
-ns2 A 10.53.0.2
- MX 10 mail
-
-a A 10.0.0.1
-mail A 10.0.0.2
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 2>&1 | sed 's/^/ns2 /'`"
+ for try in 0 1 2 3 4 5 6 7 8 9; do
+ nextpart ns2/named.run | grep "reloading configuration succeeded" > /dev/null && break
+ sleep 1
+ done
}
status=0
n=0
+nextpart ns2/named.run > /dev/null
+
# Test 1 - default, query allowed
n=`expr $n + 1`
echo_i "test $n: default - query allowed"
n=`expr $n + 1`
copy_setports ns2/named02.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: explicit any - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named03.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: none - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named04.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: address allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named05.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: address not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named06.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: address disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named07.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: acl allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named08.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: acl not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named09.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: acl disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named10.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: key allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named11.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: key not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named12.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: key disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named21.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views default - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named22.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views explicit any - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named23.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views none - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named24.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views address allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named25.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views address not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named26.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views address disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named27.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views acl allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named28.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views acl not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named29.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views acl disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named30.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views key allowed - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named31.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views key not allowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named32.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views key disallowed - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named33.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views over options, views allow - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named34.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views over options, views disallow - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named40.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: zone default - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named53.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views over options, views allow - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named54.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: views over options, views disallow - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named55.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: zones over views, views allow - query allowed"
ret=0
n=`expr $n + 1`
copy_setports ns2/named56.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: zones over views, views disallow - query refused"
ret=0
n=`expr $n + 1`
copy_setports ns2/named57.conf.in ns2/named.conf
rndc_reload
-sleep 5
echo_i "test $n: zones over views, allow-query-on"
ret=0