mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
Sweeping changes to system test suite
This commit is contained in:
@@ -9,7 +9,7 @@ NAMED=$TOP/bin/named/named
|
|||||||
KEYGEN=$TOP/bin/dnssec/dnssec-keygen
|
KEYGEN=$TOP/bin/dnssec/dnssec-keygen
|
||||||
SIGNER=$TOP/bin/dnssec/dnssec-signzone
|
SIGNER=$TOP/bin/dnssec/dnssec-signzone
|
||||||
KEYSIGNER=$TOP/bin/dnssec/dnssec-signkey
|
KEYSIGNER=$TOP/bin/dnssec/dnssec-signkey
|
||||||
KEYSETTOOL=$TOP/bin/tests/dnssec-makekeyset
|
KEYSETTOOL=$TOP/bin/dnssec/dnssec-makekeyset
|
||||||
|
|
||||||
SUBDIRS="xfer dnssec xferquota"
|
SUBDIRS="xfer dnssec xferquota"
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ while (<FILE1>) {
|
|||||||
}
|
}
|
||||||
if ($entry{"$name ; $class.$type ; $value"} ne "") {
|
if ($entry{"$name ; $class.$type ; $value"} ne "") {
|
||||||
$line = $entry{"$name ; $class.$type ; $value"};
|
$line = $entry{"$name ; $class.$type ; $value"};
|
||||||
print ("Duplicate entry:\n> $_\n< $line\n");
|
print ("Duplicate entry in $file1:\n> $_\n< $line\n");
|
||||||
} else {
|
} else {
|
||||||
$entry{"$name ; $class.$type ; $value"} = $_;
|
$entry{"$name ; $class.$type ; $value"} = $_;
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
//NS1
|
||||||
|
|
||||||
options {
|
options {
|
||||||
directory ".";
|
directory ".";
|
||||||
pid-file "named.pid";
|
pid-file "named.pid";
|
||||||
@@ -8,5 +10,7 @@ options {
|
|||||||
|
|
||||||
zone "." {
|
zone "." {
|
||||||
type master;
|
type master;
|
||||||
file "root.db";
|
file "root.db.signed";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
include "trusted.conf";
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
// NS2
|
||||||
|
|
||||||
options {
|
options {
|
||||||
pid-file "named.pid";
|
pid-file "named.pid";
|
||||||
listen-on { 10.53.0.2; };
|
listen-on { 10.53.0.2; };
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
// NS3
|
||||||
|
|
||||||
options {
|
options {
|
||||||
pid-file "named.pid";
|
pid-file "named.pid";
|
||||||
listen-on { 10.53.0.3; };
|
listen-on { 10.53.0.3; };
|
||||||
@@ -12,6 +14,7 @@ zone "." {
|
|||||||
|
|
||||||
zone "example" {
|
zone "example" {
|
||||||
type slave;
|
type slave;
|
||||||
|
masters { 10.53.0.2; };
|
||||||
file "example.bk";
|
file "example.bk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
// NS4
|
||||||
|
|
||||||
options {
|
options {
|
||||||
directory ".";
|
directory ".";
|
||||||
pid-file "named.pid";
|
pid-file "named.pid";
|
||||||
|
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
cd ns1 && sh sign.sh
|
cd ns1 && sh sign.sh
|
||||||
|
|
||||||
#echo "a.bogus.example. A 10.0.0.22" >>../ns3/secure.example.db.signed
|
echo "a.bogus.example. A 10.0.0.22" >>../ns3/bogus.example.db.signed
|
||||||
|
@@ -30,8 +30,7 @@ grep ";" dig.out.ns3
|
|||||||
status=`expr $status + $?`
|
status=`expr $status + $?`
|
||||||
grep ";" dig.out.ns4
|
grep ";" dig.out.ns4
|
||||||
|
|
||||||
perl ../digcomp.pl dig.out.ns2 dig.out.ns3
|
rm -f dig.out.*
|
||||||
perl ../digcomp.pl dig.out.ns2 dig.out.ns4
|
|
||||||
|
|
||||||
# Check the example. domain
|
# Check the example. domain
|
||||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||||
@@ -44,10 +43,70 @@ grep ";" dig.out.ns2
|
|||||||
status=`expr $status + $?`
|
status=`expr $status + $?`
|
||||||
grep ";" dig.out.ns3
|
grep ";" dig.out.ns3
|
||||||
|
|
||||||
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
perl ../digcomp.pl dig.out.ns2 dig.out.ns3
|
||||||
|
status=`expr $status + $?`
|
||||||
|
|
||||||
|
rm -f dig.out.*
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
|
||||||
|
a.example. @10.53.0.2 a > dig.out.ns2
|
||||||
|
status=`expr $status + $?`
|
||||||
|
grep ";" dig.out.ns2
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
|
||||||
a.example. @10.53.0.4 a > dig.out.ns4
|
a.example. @10.53.0.4 a > dig.out.ns4
|
||||||
status=`expr $status + $?`
|
status=`expr $status + $?`
|
||||||
|
grep ";" dig.out.ns2
|
||||||
|
|
||||||
|
perl ../digcomp.pl dig.out.ns2 dig.out.ns4
|
||||||
|
status=`expr $status + $?`
|
||||||
|
|
||||||
|
# Check the insecure.example domain
|
||||||
|
|
||||||
|
rm -f dig.out.*
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||||
|
a.insecure.example. @10.53.0.3 a > dig.out.ns3
|
||||||
|
status=`expr $status + $?`
|
||||||
|
grep ";" dig.out.ns3
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||||
|
a.insecure.example. @10.53.0.4 a > dig.out.ns4
|
||||||
|
status=`expr $status + $?`
|
||||||
grep ";" dig.out.ns4
|
grep ";" dig.out.ns4
|
||||||
|
|
||||||
perl ../digcomp.pl dig.out.ns2 dig.out.ns3
|
perl ../digcomp.pl dig.out.ns3 dig.out.ns4
|
||||||
perl ../digcomp.pl dig.out.ns2 dig.out.ns4
|
status=`expr $status + $?`
|
||||||
|
|
||||||
|
# Check the secure.example domain
|
||||||
|
|
||||||
|
rm -f dig.out.*
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||||
|
a.secure.example. @10.53.0.3 a > dig.out.ns3
|
||||||
|
status=`expr $status + $?`
|
||||||
|
grep ";" dig.out.ns3
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
|
||||||
|
a.secure.example. @10.53.0.4 a > dig.out.ns4
|
||||||
|
status=`expr $status + $?`
|
||||||
|
grep ";" dig.out.ns4
|
||||||
|
|
||||||
|
perl ../digcomp.pl dig.out.ns3 dig.out.ns4
|
||||||
|
status=`expr $status + $?`
|
||||||
|
|
||||||
|
# Check the bogus domain
|
||||||
|
|
||||||
|
rm -f dig.out.*
|
||||||
|
|
||||||
|
../../../dig/dig +tcp +noadd +nosea +nostat +noquest +nocmd \
|
||||||
|
a.bogus.example. @10.53.0.4 a > dig.out.ns4
|
||||||
|
grep "SERVFAIL" dig.out.ns4 > /dev/null
|
||||||
|
status=`expr $status + $?`
|
||||||
|
echo "SERVFAIL is expected in the following:"
|
||||||
|
grep ";" dig.out.ns4
|
||||||
|
|
||||||
|
if [ $status != 0 ]; then
|
||||||
|
echo "FAILED with status $status"
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -4,33 +4,76 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
sys=`../../../config.guess`
|
sys=`../../../config.guess`
|
||||||
case "$sys" in
|
|
||||||
sparc-sun-solaris2.[6-8])
|
case "$1" in
|
||||||
type="lo0"
|
|
||||||
|
'start')
|
||||||
|
for ns in 1 2 3 4
|
||||||
|
do
|
||||||
|
case "$sys" in
|
||||||
|
sparc-sun-solaris2.[6-8])
|
||||||
|
ifconfig lo0:$ns 10.53.0.$ns up
|
||||||
|
;;
|
||||||
|
*-pc-linux-gnu)
|
||||||
|
ifconfig lo:$ns 10.53.0.$ns up
|
||||||
|
;;
|
||||||
|
*-unknown-freebsdelf3.4)
|
||||||
|
ifconfig lo0 10.53.0.$ns alias
|
||||||
|
;;
|
||||||
|
*-unknown-netbsd*)
|
||||||
|
ifconfig lo0 10.53.0.$ns alias
|
||||||
|
;;
|
||||||
|
*-pc-bsdi3.*)
|
||||||
|
ifconfig lo0 add 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-dec-osf5.*)
|
||||||
|
ifconfig lo0 alias 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-dec-osf4.*)
|
||||||
|
ifconfig lo0 alias 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-pc-bsdi4.*)
|
||||||
|
ifconfig lo0 add 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Don't know how to set up interface. Giving up."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
i686-pc-linux-gnu)
|
|
||||||
type="lo"
|
'stop')
|
||||||
;;
|
for ns in 4 3 2 1
|
||||||
i386-unknown-freebsdelf3.4|*-unknown-netbsd*)
|
do
|
||||||
type="alias"
|
case "$sys" in
|
||||||
|
sparc-sun-solaris2.[6-8])
|
||||||
|
ifconfig lo0:$ns 10.53.0.$ns down
|
||||||
|
;;
|
||||||
|
*-pc-linux-gnu)
|
||||||
|
ifconfig lo:$ns 10.53.0.$ns down
|
||||||
|
;;
|
||||||
|
*-unknown-freebsdelf3.4)
|
||||||
|
ifconfig lo0 10.53.0.$ns delete
|
||||||
|
;;
|
||||||
|
*-unknown-netbsd*)
|
||||||
|
ifconfig lo0 10.53.0.$ns delete
|
||||||
|
;;
|
||||||
|
*-pc-bsdi3.*)
|
||||||
|
ifconfig lo0 remove 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-dec-osf5.*)
|
||||||
|
ifconfig lo0 -alias 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-dec-osf4.*)
|
||||||
|
ifconfig lo0 -alias 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*-pc-bsdi4.*)
|
||||||
|
ifconfig lo0 remove 10.53.0.$ns
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Don't know how to destroy interface. Giving up."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for ns in 1 2 3 4
|
|
||||||
do
|
|
||||||
case "$type" in
|
|
||||||
lo0)
|
|
||||||
ifconfig lo0:$ns 10.53.0.$ns up
|
|
||||||
;;
|
|
||||||
lo)
|
|
||||||
ifconfig lo:$ns 10.53.0.$ns up
|
|
||||||
;;
|
|
||||||
alias)
|
|
||||||
ifconfig lo0 10.53.0.$ns alias
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Don't know how to set up interface. Giving up."
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
done
|
|
||||||
|
@@ -4,6 +4,12 @@
|
|||||||
#
|
#
|
||||||
. ./conf.sh
|
. ./conf.sh
|
||||||
|
|
||||||
|
sh ifconfig.sh start
|
||||||
|
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
test $# -gt 0 || { echo "usage: runtest.sh test-directory" >&2; exit 1; }
|
test $# -gt 0 || { echo "usage: runtest.sh test-directory" >&2; exit 1; }
|
||||||
|
|
||||||
test=$1
|
test=$1
|
||||||
@@ -20,10 +26,19 @@ fi
|
|||||||
# Start name servers running
|
# Start name servers running
|
||||||
sh start.sh $test
|
sh start.sh $test
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
( cd $test ; sh tests.sh )
|
( cd $test ; sh tests.sh )
|
||||||
|
|
||||||
echo "Result code $?"
|
status=$_
|
||||||
|
|
||||||
# Shutdown
|
# Shutdown
|
||||||
sh stop.sh $test
|
sh stop.sh $test
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
( cd $test ; sh clean.sh )
|
||||||
|
|
||||||
|
sh ifconfig.sh stop
|
||||||
|
|
||||||
|
exit $status
|
||||||
|
20
bin/tests/system/setup.sh
Normal file
20
bin/tests/system/setup.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Run a system test.
|
||||||
|
#
|
||||||
|
. ./conf.sh
|
||||||
|
|
||||||
|
test $# -gt 0 || { echo "usage: runtest.sh test-directory" >&2; exit 1; }
|
||||||
|
|
||||||
|
test=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
test -d $test || { echo "$0: $test: no such test" >&2; exit 1; }
|
||||||
|
|
||||||
|
# Set up any dynamically generated test data
|
||||||
|
if test -f $test/setup.sh
|
||||||
|
then
|
||||||
|
( cd $test && sh setup.sh "$@" )
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@@ -12,3 +12,13 @@ do
|
|||||||
kill -TERM `cat $pidfile`
|
kill -TERM `cat $pidfile`
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
for d in ns*
|
||||||
|
do
|
||||||
|
pidfile="$d/named.pid"
|
||||||
|
if [ -f $pidfile ]; then
|
||||||
|
kill -KILL `cat $pidfile`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@@ -27,3 +27,9 @@ status=`expr $status + $?`
|
|||||||
|
|
||||||
perl ../digcomp.pl knowngood.dig.out dig.out.ns3
|
perl ../digcomp.pl knowngood.dig.out dig.out.ns3
|
||||||
status=`expr $status + $?`
|
status=`expr $status + $?`
|
||||||
|
|
||||||
|
if [ $status != 0 ]; then
|
||||||
|
echo "FAILED with status $status"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $status
|
||||||
|
Reference in New Issue
Block a user