mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add views test
This commit is contained in:
@@ -3,4 +3,5 @@
|
||||
rm -f */K* */*.keyset */*.signedkey */*.signed */trusted.conf
|
||||
rm -f ns1/root.db ns2/example.db ns3/secure.example.db
|
||||
rm -f ns3/unsecure.example.db ns3/bogus.example.db
|
||||
rm -f dig.out.*
|
||||
rm -f dig.out.*
|
||||
|
||||
|
7
bin/tests/system/views/clean.sh
Normal file
7
bin/tests/system/views/clean.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Clean up after zone transfer tests.
|
||||
#
|
||||
|
||||
rm -f ns3/example.bk dig.out.ns2 dig.out.ns3 ns*/named.run
|
||||
|
5
bin/tests/system/views/setup.sh
Normal file
5
bin/tests/system/views/setup.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cp ns2/example1.db ns2/example.db
|
||||
cp ns2/named1.conf ns2/named.conf
|
||||
cp ns3/named1.conf ns3/named.conf
|
67
bin/tests/system/views/tests.sh
Normal file
67
bin/tests/system/views/tests.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Perform tests
|
||||
#
|
||||
|
||||
TOP="`cd ../../../..; pwd`"
|
||||
|
||||
NAMED=$TOP/bin/named/named
|
||||
export NAMED
|
||||
|
||||
rm -f dig.out.ns2* dig.out.ns3* 2>&1 > /dev/null
|
||||
|
||||
status=0;
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
|
||||
a.example. @10.53.0.2 any > dig.out.ns2.1
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns2.1
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
|
||||
a.example. @10.53.0.3 any > dig.out.ns3.1
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns3.1
|
||||
|
||||
rm -f ns2/named.conf ns3/named.conf ns2/example.db
|
||||
cp ns2/named2.conf ns2/named.conf
|
||||
cp ns3/named2.conf ns3/named.conf
|
||||
cp ns2/example2.db ns2/example.db
|
||||
kill -HUP `cat ns2/named.pid`
|
||||
kill -HUP `cat ns3/named.pid`
|
||||
sleep 10
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
|
||||
-b 10.53.0.4 a.example. @10.53.0.4 any > dig.out.ns4.2
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns4.2
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
|
||||
-b 10.53.0.2 a.example. @10.53.0.2 any > dig.out.ns2.2
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns2.2
|
||||
|
||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth\
|
||||
@10.53.0.3 a.example. any > dig.out.ns3.2
|
||||
status=`expr $status + $?`
|
||||
grep ";" dig.out.ns3.2
|
||||
|
||||
perl ../digcomp.pl dig.out.ns2.1 dig.out.ns4.2
|
||||
status=`expr $status + $?`
|
||||
|
||||
perl ../digcomp.pl dig.out.ns3.1 dig.out.ns2.2
|
||||
status=`expr $status + $?`
|
||||
|
||||
perl ../digcomp.pl dig.out.ns3.1 dig.out.ns3.2
|
||||
status=`expr $status + $?`
|
||||
|
||||
echo "Differences should be found in the following lines:"
|
||||
perl ../digcomp.pl dig.out.ns2.1 dig.out.ns3.2
|
||||
if [ $? = 0 ]; then
|
||||
echo "No differences found. Something's wrong."
|
||||
$status=`expr $status + 1`
|
||||
fi
|
||||
|
||||
if [ $status != 0 ]; then
|
||||
echo "FAILED with status $status"
|
||||
fi
|
||||
|
||||
exit $status
|
@@ -3,4 +3,5 @@
|
||||
# Clean up after zone transfer tests.
|
||||
#
|
||||
|
||||
rm -f ns3/example.bk dig.out.ns2 dig.out.ns3
|
||||
rm -f ns3/example.bk dig.out.ns2 dig.out.ns3 ns*/named.run
|
||||
|
||||
|
@@ -5,3 +5,5 @@
|
||||
|
||||
rm -f ns1/zone*.example.db ns1/zones.conf
|
||||
rm -f ns2/zone*.example.bk ns2/zones.conf
|
||||
rm -f dig.out.* rm ns*/named.run
|
||||
|
||||
|
@@ -5,7 +5,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 < 1000; $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";
|
||||
@@ -17,6 +17,7 @@ for ($z = 0; $z < 100; $z++) {
|
||||
MX 10 mail1.isp.example.
|
||||
MX 20 mail2.isp.example.
|
||||
www A 10.0.0.1
|
||||
xyzzy A 10.0.0.2
|
||||
";
|
||||
$f->close;
|
||||
}
|
||||
|
Reference in New Issue
Block a user