mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Add additional test to determine if NOTIFY messages are properly handled
during zone transfers.
This commit is contained in:
16
bin/tests/system/xferquota/ns1/changing1.db
Normal file
16
bin/tests/system/xferquota/ns1/changing1.db
Normal file
@@ -0,0 +1,16 @@
|
||||
$TTL 600
|
||||
|
||||
@ IN SOA dns.changing. postmaster.changing. (
|
||||
1 ;; serial
|
||||
3600 ;; refresh period
|
||||
1800 ;; retry interval
|
||||
604800 ;; expire time
|
||||
600 ) ;; default TTL
|
||||
|
||||
IN NS dns1.changing.
|
||||
NS dns2.changing.
|
||||
|
||||
dns1 IN A 10.53.0.1
|
||||
dns2 IN A 10.53.0.2
|
||||
|
||||
a IN A 10.0.0.1
|
16
bin/tests/system/xferquota/ns1/changing2.db
Normal file
16
bin/tests/system/xferquota/ns1/changing2.db
Normal file
@@ -0,0 +1,16 @@
|
||||
$TTL 600
|
||||
|
||||
@ IN SOA dns.changing. postmaster.changing. (
|
||||
2 ;; serial
|
||||
3600 ;; refresh period
|
||||
1800 ;; retry interval
|
||||
604800 ;; expire time
|
||||
600 ) ;; default TTL
|
||||
|
||||
IN NS dns1.changing.
|
||||
NS dns2.changing.
|
||||
|
||||
dns1 IN A 10.53.0.1
|
||||
dns2 IN A 10.53.0.2
|
||||
|
||||
a IN A 10.0.0.2
|
@@ -11,4 +11,9 @@ zone "." {
|
||||
file "root.db";
|
||||
};
|
||||
|
||||
zone "changing." {
|
||||
type master;
|
||||
file "changing.db";
|
||||
};
|
||||
|
||||
include "zones.conf";
|
||||
|
@@ -11,3 +11,8 @@ a.root-servers.nil. A 10.53.0.1
|
||||
|
||||
example. NS ns2.example.
|
||||
ns2.example. A 10.53.0.2
|
||||
|
||||
changing. NS dns1.changing.
|
||||
A 10.53.0.1
|
||||
NS dns2.changing.
|
||||
A 10.53.0.2
|
||||
|
@@ -13,4 +13,10 @@ zone "." {
|
||||
file "root.hint";
|
||||
};
|
||||
|
||||
zone "changing." {
|
||||
type slave;
|
||||
masters { 10.53.0.1; };
|
||||
file "changing.bk";
|
||||
};
|
||||
|
||||
include "zones.conf";
|
||||
|
@@ -23,7 +23,7 @@ use FileHandle;
|
||||
my $masterconf = new FileHandle("ns1/zones.conf", "w") or die;
|
||||
my $slaveconf = new FileHandle("ns2/zones.conf", "w") or die;
|
||||
|
||||
for ($z = 0; $z < 100; $z++) {
|
||||
for ($z = 0; $z < 300; $z++) {
|
||||
my $zn = sprintf("zone%06d.example", $z);
|
||||
print $masterconf "zone \"$zn\" { type master; file \"$zn.db\"; };\n";
|
||||
print $slaveconf "zone \"$zn\" { type slave; file \"$zn.bk\"; masters { 10.53.0.1; }; };\n";
|
||||
|
@@ -19,4 +19,4 @@
|
||||
# Set up test data for zone transfer quota tests.
|
||||
#
|
||||
perl setup.pl
|
||||
|
||||
cp ns1/changing1.db ns1/changing.db
|
||||
|
@@ -32,13 +32,18 @@ fi
|
||||
|
||||
count=0
|
||||
ticks=0
|
||||
while [ $count != 100 ]; do
|
||||
sleep 5
|
||||
while [ $count != 300 ]; do
|
||||
if [ $ticks = 1 ]; then
|
||||
echo "Changing test zone..."
|
||||
cp ns1/changing2.db ns1/changing.db
|
||||
kill -HUP `cat ns1/named.pid`
|
||||
fi
|
||||
sleep 1
|
||||
ticks=`expr $ticks + 1`
|
||||
seconds=`expr $ticks \* 5`
|
||||
seconds=`expr $ticks \* 1`
|
||||
if [ $ticks = 60 ]; then
|
||||
echo "Took too long to load domains."
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
count=`cat ns2/zone*.bk | grep xyzzy | wc -l`
|
||||
echo "I:Have $count domains up in $seconds seconds"
|
||||
@@ -58,6 +63,21 @@ grep ";" dig.out.ns2
|
||||
perl ../digcomp.pl dig.out.ns1 dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
|
||||
sleep 5
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||
a.changing. @10.53.0.1 a > dig.out.ns1
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns1
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||
a.changing. @10.53.0.2 a > dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns2
|
||||
|
||||
perl ../digcomp.pl dig.out.ns1 dig.out.ns2
|
||||
status=`expr $status + $?`
|
||||
|
||||
if [ $status != 0 ]; then
|
||||
echo "R:FAIL"
|
||||
else
|
||||
|
Reference in New Issue
Block a user