diff --git a/bin/tests/system/dnssec/clean.sh b/bin/tests/system/dnssec/clean.sh index 492f56919f..f7282000e4 100644 --- a/bin/tests/system/dnssec/clean.sh +++ b/bin/tests/system/dnssec/clean.sh @@ -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.* + diff --git a/bin/tests/system/views/clean.sh b/bin/tests/system/views/clean.sh new file mode 100644 index 0000000000..4eef96060b --- /dev/null +++ b/bin/tests/system/views/clean.sh @@ -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 + diff --git a/bin/tests/system/views/setup.sh b/bin/tests/system/views/setup.sh new file mode 100644 index 0000000000..07b82f69c8 --- /dev/null +++ b/bin/tests/system/views/setup.sh @@ -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 diff --git a/bin/tests/system/views/tests.sh b/bin/tests/system/views/tests.sh new file mode 100644 index 0000000000..a8b82015ef --- /dev/null +++ b/bin/tests/system/views/tests.sh @@ -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 diff --git a/bin/tests/system/xfer/clean.sh b/bin/tests/system/xfer/clean.sh index 8b725e8d25..4eef96060b 100644 --- a/bin/tests/system/xfer/clean.sh +++ b/bin/tests/system/xfer/clean.sh @@ -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 + diff --git a/bin/tests/system/xferquota/clean.sh b/bin/tests/system/xferquota/clean.sh index cd572500a4..af5348a6e0 100644 --- a/bin/tests/system/xferquota/clean.sh +++ b/bin/tests/system/xferquota/clean.sh @@ -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 + diff --git a/bin/tests/system/xferquota/setup.pl b/bin/tests/system/xferquota/setup.pl index 51ed7b1693..a117fc5f7a 100644 --- a/bin/tests/system/xferquota/setup.pl +++ b/bin/tests/system/xferquota/setup.pl @@ -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; }