mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Merge branch '1100-inline-signing-include' into 'main'
Resolve "Test inline-signing with $INCLUDE" Closes #1100 See merge request isc-projects/bind9!4825
This commit is contained in:
1
bin/tests/system/inline/ns3/include.db.in
Normal file
1
bin/tests/system/inline/ns3/include.db.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
f A 10.0.0.7
|
24
bin/tests/system/inline/ns3/master7.db.in
Normal file
24
bin/tests/system/inline/ns3/master7.db.in
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
; 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.
|
||||||
|
|
||||||
|
$TTL 300 ; 5 minutes
|
||||||
|
@ IN SOA ns3 . (
|
||||||
|
2000042412 ; serial
|
||||||
|
20 ; refresh (20 seconds)
|
||||||
|
20 ; retry (20 seconds)
|
||||||
|
1814400 ; expire (3 weeks)
|
||||||
|
3600 ; minimum (1 hour)
|
||||||
|
)
|
||||||
|
NS ns3
|
||||||
|
ns3 A 10.53.0.3
|
||||||
|
|
||||||
|
c A 10.0.0.3
|
||||||
|
e A 10.0.0.5
|
||||||
|
|
||||||
|
$INCLUDE include.db
|
@@ -30,6 +30,7 @@ cp ns3/master.db.in ns3/nsec3.db
|
|||||||
cp ns3/master.db.in ns3/externalkey.db
|
cp ns3/master.db.in ns3/externalkey.db
|
||||||
cp ns3/master.db.in ns3/delayedkeys.db
|
cp ns3/master.db.in ns3/delayedkeys.db
|
||||||
cp ns3/master.db.in ns3/removedkeys-primary.db
|
cp ns3/master.db.in ns3/removedkeys-primary.db
|
||||||
|
cp ns3/include.db.in ns3/include.db
|
||||||
|
|
||||||
mkdir ns3/removedkeys
|
mkdir ns3/removedkeys
|
||||||
|
|
||||||
|
@@ -940,17 +940,17 @@ status=`expr $status + $ret`
|
|||||||
|
|
||||||
n=`expr $n + 1`
|
n=`expr $n + 1`
|
||||||
echo_i "check that reloading errors prevent synchronization ($n)"
|
echo_i "check that reloading errors prevent synchronization ($n)"
|
||||||
ret=0
|
ret=1
|
||||||
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.1 || ret=1
|
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.1 || ret=1
|
||||||
sleep 1
|
sleep 1
|
||||||
nextpart ns3/named.run > /dev/null
|
nextpart ns3/named.run > /dev/null
|
||||||
cp ns3/master5.db.in ns3/master.db
|
cp ns3/master6.db.in ns3/master.db
|
||||||
rndc_reload ns3 10.53.0.3
|
rndc_reload ns3 10.53.0.3
|
||||||
for i in 1 2 3 4 5 6 7 8 9 10
|
for i in 1 2 3 4 5 6 7 8 9 10
|
||||||
do
|
do
|
||||||
if nextpart ns3/named.run |
|
if nextpart ns3/named.run | grep "not loaded due to errors" > /dev/null
|
||||||
grep "not loaded due to errors" > /dev/null
|
|
||||||
then
|
then
|
||||||
|
ret=0
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -961,6 +961,30 @@ $DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null || ret=1
|
|||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=`expr $status + $ret`
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
|
n=`expr $n + 1`
|
||||||
|
echo_i "check inline-signing with an include file ($n)"
|
||||||
|
ret=0
|
||||||
|
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.1 || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=`expr $status + $ret`
|
||||||
|
sleep 1
|
||||||
|
nextpart ns3/named.run > /dev/null
|
||||||
|
cp ns3/master7.db.in ns3/master.db
|
||||||
|
rndc_reload ns3 10.53.0.3
|
||||||
|
_includefile_loaded() {
|
||||||
|
$DIG $DIGOPTS @10.53.0.3 f.master A > dig.out.ns3.test$n
|
||||||
|
grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || return 1
|
||||||
|
grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || return 1
|
||||||
|
grep "10\.0\.0\.7" dig.out.ns3.test$n > /dev/null || return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
retry_quiet 10 _includefile_loaded
|
||||||
|
# Sanity check: the SOA record should be changed
|
||||||
|
$DIG $DIGOPTS +short @10.53.0.3 master SOA > dig.out.ns3.test$n.2 || ret=1
|
||||||
|
$DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null && ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=`expr $status + $ret`
|
||||||
|
|
||||||
n=`expr $n + 1`
|
n=`expr $n + 1`
|
||||||
echo_i "test add/del zone combinations ($n)"
|
echo_i "test add/del zone combinations ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
|
@@ -6294,9 +6294,10 @@ The ``$INCLUDE`` Directive
|
|||||||
Syntax: ``$INCLUDE`` filename [origin] [comment]
|
Syntax: ``$INCLUDE`` filename [origin] [comment]
|
||||||
|
|
||||||
This reads and processes the file ``filename`` as if it were included in the
|
This reads and processes the file ``filename`` as if it were included in the
|
||||||
file at this point. If ``origin`` is specified, the file is processed
|
file at this point. The ``filename`` can be an absolute path, or a relative
|
||||||
with ``$ORIGIN`` set to that value; otherwise, the current ``$ORIGIN`` is
|
path. In the latter case it is read from ``named``'s working directory. If
|
||||||
used.
|
``origin`` is specified, the file is processed with ``$ORIGIN`` set to that
|
||||||
|
value; otherwise, the current ``$ORIGIN`` is used.
|
||||||
|
|
||||||
The origin and the current domain name revert to the values they had
|
The origin and the current domain name revert to the values they had
|
||||||
prior to the ``$INCLUDE`` once the file has been read.
|
prior to the ``$INCLUDE`` once the file has been read.
|
||||||
|
Reference in New Issue
Block a user