mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:15:18 +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";
|
file "root.db";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "changing." {
|
||||||
|
type master;
|
||||||
|
file "changing.db";
|
||||||
|
};
|
||||||
|
|
||||||
include "zones.conf";
|
include "zones.conf";
|
||||||
|
@@ -11,3 +11,8 @@ a.root-servers.nil. A 10.53.0.1
|
|||||||
|
|
||||||
example. NS ns2.example.
|
example. NS ns2.example.
|
||||||
ns2.example. A 10.53.0.2
|
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";
|
file "root.hint";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "changing." {
|
||||||
|
type slave;
|
||||||
|
masters { 10.53.0.1; };
|
||||||
|
file "changing.bk";
|
||||||
|
};
|
||||||
|
|
||||||
include "zones.conf";
|
include "zones.conf";
|
||||||
|
@@ -23,7 +23,7 @@ use FileHandle;
|
|||||||
my $masterconf = new FileHandle("ns1/zones.conf", "w") or die;
|
my $masterconf = new FileHandle("ns1/zones.conf", "w") or die;
|
||||||
my $slaveconf = new FileHandle("ns2/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);
|
my $zn = sprintf("zone%06d.example", $z);
|
||||||
print $masterconf "zone \"$zn\" { type master; file \"$zn.db\"; };\n";
|
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";
|
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.
|
# Set up test data for zone transfer quota tests.
|
||||||
#
|
#
|
||||||
perl setup.pl
|
perl setup.pl
|
||||||
|
cp ns1/changing1.db ns1/changing.db
|
||||||
|
@@ -32,13 +32,18 @@ fi
|
|||||||
|
|
||||||
count=0
|
count=0
|
||||||
ticks=0
|
ticks=0
|
||||||
while [ $count != 100 ]; do
|
while [ $count != 300 ]; do
|
||||||
sleep 5
|
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`
|
ticks=`expr $ticks + 1`
|
||||||
seconds=`expr $ticks \* 5`
|
seconds=`expr $ticks \* 1`
|
||||||
if [ $ticks = 60 ]; then
|
if [ $ticks = 60 ]; then
|
||||||
echo "Took too long to load domains."
|
echo "Took too long to load domains."
|
||||||
exit 1;
|
exit 1
|
||||||
fi
|
fi
|
||||||
count=`cat ns2/zone*.bk | grep xyzzy | wc -l`
|
count=`cat ns2/zone*.bk | grep xyzzy | wc -l`
|
||||||
echo "I:Have $count domains up in $seconds seconds"
|
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
|
perl ../digcomp.pl dig.out.ns1 dig.out.ns2
|
||||||
status=`expr $status + $?`
|
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
|
if [ $status != 0 ]; then
|
||||||
echo "R:FAIL"
|
echo "R:FAIL"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user