Commit c032c54d authored by Evan Hunt's avatar Evan Hunt
Browse files

parallelize most system tests

parent 0217cc8b
...@@ -46,7 +46,26 @@ feature-test@EXEEXT@: feature-test.@O@ ...@@ -46,7 +46,26 @@ feature-test@EXEEXT@: feature-test.@O@
# Define the tests that can be run in parallel. This should be identical to # Define the tests that can be run in parallel. This should be identical to
# the definition of PARALLELDIRS in conf.sh. # the definition of PARALLELDIRS in conf.sh.
PARALLEL = allow_query catz rpzrecurse serve-stale PARALLEL = acl additional addzone allow_query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
cookie database digdelv dlv dlz dlzexternal \
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue inline integrity ixfr keepalive \
legacy limits logfileconfig \
masterfile masterformat metadata mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined \
reclimit redirect resolver rndc rpz rpzrecurse \
rrchecker rrl rrsetorder rsabigexponent runtime \
serve-stale sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks
# Produce intermediate makefile that assigns unique port numbers to each # Produce intermediate makefile that assigns unique port numbers to each
# parallel test. The start port number of 5,000 is arbitrary - it must just # parallel test. The start port number of 5,000 is arbitrary - it must just
...@@ -56,11 +75,13 @@ PARALLEL = allow_query catz rpzrecurse serve-stale ...@@ -56,11 +75,13 @@ PARALLEL = allow_query catz rpzrecurse serve-stale
# underscores in target names and requires explicit differentiation # underscores in target names and requires explicit differentiation
# between a target name and a directory name (.PHONY is not supported). # between a target name and a directory name (.PHONY is not supported).
.PHONY: parallel.mk
parallel.mk: parallel.mk:
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \ PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \ echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
echo "" >> $@ ; \ echo "" >> $@ ; \
echo "check: $$PARALLEL_SANITIZED" >> $@ ; \ echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
port=$${STARTPORT:-5000} ; \ port=$${STARTPORT:-5000} ; \
for directory in $(PARALLEL) ; do \ for directory in $(PARALLEL) ; do \
echo "" >> $@ ; \ echo "" >> $@ ; \
......
...@@ -334,7 +334,7 @@ are: ...@@ -334,7 +334,7 @@ are:
PORT Number to be used for the query port. PORT Number to be used for the query port.
CONTROLPORT Number to be used as the RNDC control port. CONTROLPORT Number to be used as the RNDC control port.
EXTRAPORT1 - EXTRAPORT8 Eight port numbers that can be use as needed. EXTRAPORT1 - EXTRAPORT8 Eight port numbers that can be used as needed.
Two other environment variables are defined: Two other environment variables are defined:
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
# #
rm -f dig.out.* rm -f dig.out.*
rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl ns2/named.conf rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl
rm -f */named.conf
rm -f */named.memstats rm -f */named.memstats
rm -f */named.run rm -f */named.run
rm -f ns*/named.lock rm -f ns*/named.lock
......
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/* $Id: named1.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */ key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls { /* empty */ }; controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -24,8 +29,6 @@ options { ...@@ -24,8 +29,6 @@ options {
check-integrity no; check-integrity no;
}; };
include "../../common/controls.conf";
key one { key one {
algorithm hmac-md5; algorithm hmac-md5;
secret "1234abcd8765"; secret "1234abcd8765";
......
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/* $Id: named2.conf,v 1.3 2008/01/21 20:38:54 each Exp $ */ key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls { /* empty */ }; controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -24,8 +29,6 @@ options { ...@@ -24,8 +29,6 @@ options {
check-integrity no; check-integrity no;
}; };
include "../../common/controls.conf";
key one { key one {
algorithm hmac-md5; algorithm hmac-md5;
secret "1234abcd8765"; secret "1234abcd8765";
......
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/* $Id: named3.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */ key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls { /* empty */ }; controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -24,8 +29,6 @@ options { ...@@ -24,8 +29,6 @@ options {
check-integrity no; check-integrity no;
}; };
include "../../common/controls.conf";
key one { key one {
algorithm hmac-md5; algorithm hmac-md5;
secret "1234abcd8765"; secret "1234abcd8765";
......
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/* $Id: named4.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */ key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls { /* empty */ }; controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -24,8 +29,6 @@ options { ...@@ -24,8 +29,6 @@ options {
check-integrity no; check-integrity no;
}; };
include "../../common/controls.conf";
key one { key one {
algorithm hmac-md5; algorithm hmac-md5;
secret "1234abcd8765"; secret "1234abcd8765";
......
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
/* $Id: named1.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */ key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls { /* empty */ }; controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -25,8 +30,6 @@ options { ...@@ -25,8 +30,6 @@ options {
allow-query-on { 10.53.0.2; }; allow-query-on { 10.53.0.2; };
}; };
include "../../common/controls.conf";
key one { key one {
algorithm hmac-md5; algorithm hmac-md5;
secret "1234abcd8765"; secret "1234abcd8765";
......
...@@ -6,13 +6,20 @@ ...@@ -6,13 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
controls { /* empty */ }; key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -23,8 +30,6 @@ options { ...@@ -23,8 +30,6 @@ options {
allow-query-on { 10.53.0.2; }; allow-query-on { 10.53.0.2; };
}; };
include "../../common/controls.conf";
zone "." { zone "." {
type hint; type hint;
file "../../common/root.hint"; file "../../common/root.hint";
......
...@@ -6,13 +6,20 @@ ...@@ -6,13 +6,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
controls { /* empty */ }; key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
options { options {
query-source address 10.53.0.2; query-source address 10.53.0.2;
notify-source 10.53.0.2; notify-source 10.53.0.2;
transfer-source 10.53.0.2; transfer-source 10.53.0.2;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.2; }; listen-on { 10.53.0.2; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -23,8 +30,6 @@ options { ...@@ -23,8 +30,6 @@ options {
allow-query-on { 10.53.0.2; }; allow-query-on { 10.53.0.2; };
}; };
include "../../common/controls.conf";
view one { view one {
match-clients { ecs 192.0.2/24; }; match-clients { ecs 192.0.2/24; };
......
...@@ -10,7 +10,7 @@ options { ...@@ -10,7 +10,7 @@ options {
query-source address 10.53.0.3; query-source address 10.53.0.3;
notify-source 10.53.0.3; notify-source 10.53.0.3;
transfer-source 10.53.0.3; transfer-source 10.53.0.3;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.3; }; listen-on { 10.53.0.3; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -21,7 +21,7 @@ options { ...@@ -21,7 +21,7 @@ options {
}; };
controls { controls {
inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
}; };
key rndc_key { key rndc_key {
......
...@@ -10,7 +10,7 @@ options { ...@@ -10,7 +10,7 @@ options {
query-source address 10.53.0.4; query-source address 10.53.0.4;
notify-source 10.53.0.4; notify-source 10.53.0.4;
transfer-source 10.53.0.4; transfer-source 10.53.0.4;
port 5300; port @PORT@;
pid-file "named.pid"; pid-file "named.pid";
listen-on { 10.53.0.4; }; listen-on { 10.53.0.4; };
listen-on-v6 { none; }; listen-on-v6 { none; };
...@@ -21,7 +21,7 @@ options { ...@@ -21,7 +21,7 @@ options {
}; };
controls { controls {
inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; }; inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
}; };
key rndc_key { key rndc_key {
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
SYSTEMTESTTOP=.. SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh . $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
$SHELL ../genzone.sh 2 3 >ns2/example.db $SHELL ../genzone.sh 2 3 >ns2/example.db
$SHELL ../genzone.sh 2 3 >ns2/tsigzone.db $SHELL ../genzone.sh 2 3 >ns2/tsigzone.db
cp -f ns2/named1.conf ns2/named.conf copy_setports ns2/named1.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
copy_setports ns4/named.conf.in ns4/named.conf
...@@ -6,231 +6,228 @@ ...@@ -6,231 +6,228 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id: tests.sh,v 1.4 2008/07/19 00:02:14 each Exp $
SYSTEMTESTTOP=.. SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh . $SYSTEMTESTTOP/conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd" DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
status=0 status=0
t=0 t=0
echo "I:testing basic ACL processing" echo_i "testing basic ACL processing"
# key "one" should fail # key "one" should fail
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
# any other key should be fine # any other key should be fine
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
cp -f ns2/named2.conf ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /' $RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
sleep 5 sleep 5
# prefix 10/8 should fail # prefix 10/8 should fail
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
# any other address should work, as long as it sends key "one" # any other address should work, as long as it sends key "one"
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 127.0.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 127.0.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
echo "I:testing nested ACL processing" echo_i "testing nested ACL processing"
# all combinations of 10.53.0.{1|2} with key {one|two}, should succeed # all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
cp -f ns2/named3.conf ns2/named.conf copy_setports ns2/named3.conf.in ns2/named.conf
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /' $RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
sleep 5 sleep 5
# should succeed # should succeed
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
# should succeed # should succeed
t=`expr $t + 1` t=`expr $t + 1`
$DIG $DIGOPTS tsigzone. \ $DIG $DIGOPTS tsigzone. \
@10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t} @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 > dig.out.${t}
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; } grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }