Merge branch 'each-win32-parallel-tests-v9_14' into 'v9_14'
enable parallel system tests on windows See merge request isc-projects/bind9!1894
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -1,5 +1,8 @@
|
||||
5221. [test] Enable parallel execution of system tests on
|
||||
Windows. [GL !4101]
|
||||
|
||||
5220. [cleanup] Refactor the isc_stat structure to take advantage
|
||||
of stdatomic. [MR !1493]
|
||||
of stdatomic. [GL !1493]
|
||||
|
||||
5219. [bug] Fixed a race in the filter-aaaa plugin that could
|
||||
trigger a crash when returning an instance object
|
||||
|
||||
@@ -47,32 +47,6 @@ feature-test@EXEEXT@: feature-test.@O@
|
||||
# Running the scripts below is bypassed when a separate build directory is
|
||||
# used.
|
||||
|
||||
# Define the tests that can be run in parallel. This should be identical to
|
||||
# the definition of PARALLELDIRS in conf.sh. Note: longer-running tests
|
||||
# such as serve-stale and rpzrecurse stale are scheduled first to get more
|
||||
# benefit from parallelism.
|
||||
PARALLEL = rpzrecurse serve-stale dnssec \
|
||||
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 @DNSTAP@ dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip glue idna inline integrity ixfr keepalive \
|
||||
legacy limits logfileconfig \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks
|
||||
|
||||
# Produce intermediate makefile that assigns unique port numbers to each
|
||||
# parallel test. The start port number of 5,000 is arbitrary - it must just
|
||||
# be greater than the highest privileged port, 1024.
|
||||
@@ -84,26 +58,7 @@ PARALLEL = rpzrecurse serve-stale dnssec \
|
||||
.PHONY: parallel.mk
|
||||
|
||||
parallel.mk:
|
||||
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
|
||||
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
|
||||
echo "" >> $@ ; \
|
||||
echo "check_interfaces:" >> $@ ; \
|
||||
echo " @${PERL} testsock.pl > /dev/null 2>&1 || { \\" >> $@ ; \
|
||||
echo " echo \"I:NOTE: System tests were skipped because they require that the\"; \\" >> $@ ; \
|
||||
echo " echo \"I: IP addresses 10.53.0.1 through 10.53.0.8 be configured\"; \\" >> $@ ; \
|
||||
echo " echo \"I: as alias addresses on the loopback interface. Please run\"; \\" >> $@ ; \
|
||||
echo " echo \"I: \"bin/tests/system/ifconfig.sh up\" as root to configure them.\"; \\" >> $@ ; \
|
||||
echo " exit 1; \\" >> $@ ; \
|
||||
echo " }" >> $@ ; \
|
||||
echo "" >> $@ ; \
|
||||
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
|
||||
port=$${STARTPORT:-5000} ; \
|
||||
for directory in $(PARALLEL) ; do \
|
||||
echo "" >> $@ ; \
|
||||
echo "test-`echo $$directory | tr _ -`: check_interfaces" >> $@ ; \
|
||||
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
||||
port=`expr $$port + 100` ; \
|
||||
done
|
||||
$(SHELL) parallel.sh > parallel.mk
|
||||
|
||||
# Targets to run the tests.
|
||||
|
||||
|
||||
@@ -25,6 +25,56 @@ TESTSOCK6="$TESTSOCK6"
|
||||
|
||||
. ${TOP}/version
|
||||
|
||||
#
|
||||
# Common lists of system tests to run.
|
||||
#
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# The following tests are hard-coded to use ports 5300 and 9953. For
|
||||
# this reason, these must be run sequentially.
|
||||
#
|
||||
# Sequential tests that only run on unix/linux should be added to
|
||||
# SEQUENTIAL_UNIX in conf.sh.in; those that only run on windows should
|
||||
# be added to SEQUENTIAL_WINDOWS in conf.sh.win32.
|
||||
#
|
||||
SEQUENTIAL_COMMON="ecdsa eddsa @PKCS11_TEST@ tkey"
|
||||
|
||||
#
|
||||
# These tests can use ports assigned by the caller (other than 5300
|
||||
# and 9953). Because separate blocks of ports can be used for teach
|
||||
# test, these tests can be run in parallel.
|
||||
#
|
||||
# Parallel tests that only run on unix/linux should be added to
|
||||
# PARALLEL_UNIX in conf.sh.in; those that only run on windows should
|
||||
# be added to PARALLEL_WINDOWS in conf.sh.win32.
|
||||
#
|
||||
# Note: some of the longer-running tests such as serve-stale and
|
||||
# rpzrecurse are scheduled first, in order to get more benefit from
|
||||
# parallelism.
|
||||
#
|
||||
PARALLEL_COMMON="dnssec rpzrecurse serve-stale \
|
||||
acl additional addzone allow-query auth autosign \
|
||||
builtin cacheclean case catz cds chain \
|
||||
checkconf checknames checkzone \
|
||||
cookie database digdelv dlv dlz dlzexternal \
|
||||
dns64 dscp dsdigest dyndb \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward \
|
||||
geoip glue idna inline integrity ixfr keepalive legacy limits \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
|
||||
#
|
||||
# Set up color-coded test output
|
||||
#
|
||||
@@ -164,13 +214,13 @@ keyfile_to_keys_section() {
|
||||
shift
|
||||
echo "$section_name {"
|
||||
for keyname in $*; do
|
||||
awk '!/^; /{
|
||||
printf "\t\""$1"\" "
|
||||
printf "'"$key_prefix"'"
|
||||
printf $4 " " $5 " " $6 " \""
|
||||
for (i=7; i<=NF; i++) printf $i
|
||||
printf "\";\n"
|
||||
}' $keyname.key
|
||||
awk '!/^; /{
|
||||
printf "\t\""$1"\" "
|
||||
printf "'"$key_prefix"'"
|
||||
printf $4 " " $5 " " $6 " \""
|
||||
for (i=7; i<=NF; i++) printf $i
|
||||
printf "\";\n"
|
||||
}' $keyname.key
|
||||
done
|
||||
echo "};"
|
||||
}
|
||||
@@ -247,7 +297,7 @@ nextpartread() {
|
||||
[ -f $1.prev ] || nextpartreset $1
|
||||
prev=`cat $1.prev`
|
||||
awk "NR > $prev "'{ print }
|
||||
END { print NR > "/dev/stderr" }' $1
|
||||
END { print NR > "/dev/stderr" }' $1
|
||||
}
|
||||
|
||||
# nextpart: read everything that's been appended to a file since the
|
||||
@@ -269,7 +319,7 @@ rndc_reload() {
|
||||
# we need to wait for reload to finish
|
||||
if [ -z "$3" ]; then
|
||||
for __try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
@@ -278,7 +328,7 @@ rndc_reload() {
|
||||
rndc_reconfig() {
|
||||
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/'$1' /'`"
|
||||
for __try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
|
||||
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
# Find the top of the BIND9 tree.
|
||||
TOP=@abs_top_builddir@
|
||||
|
||||
# This is not the windows build.
|
||||
CYGWIN=""
|
||||
|
||||
# Load common values shared between windows and unix/linux.
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
ARPANAME=$TOP/bin/tools/arpaname
|
||||
CDS=$TOP/bin/dnssec/dnssec-cds
|
||||
CHECKCONF=$TOP/bin/check/named-checkconf
|
||||
@@ -66,40 +72,14 @@ SAMPLEUPDATE=$TOP/lib/samples/sample-update
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=/dev/null
|
||||
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# List of tests hard-coded to use ports 5300 and 9953. For this
|
||||
# reason, these must be run sequentially.
|
||||
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
|
||||
# Construct the lists of tests to run
|
||||
#
|
||||
SEQUENTIAL_UNIX=""
|
||||
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_UNIX"
|
||||
|
||||
# List of tests that use ports assigned by caller (other than 5300
|
||||
# and 9953). Because separate blocks of ports can be used for teach
|
||||
# test, these tests can be run in parallel.
|
||||
#
|
||||
# This symbol must be kept in step with the PARALLEL macro in Makefile.in
|
||||
PARALLELDIRS="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 idna inline integrity ixfr keepalive \
|
||||
legacy limits logfileconfig \
|
||||
masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
serve-stale sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig"
|
||||
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX"
|
||||
|
||||
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
|
||||
|
||||
@@ -135,6 +115,3 @@ HAVEXMLSTATS=@XMLSTATS@
|
||||
HAVEJSONSTATS=@JSONSTATS@
|
||||
ZLIB=@ZLIB@
|
||||
NZD=@NZD_TOOLS@
|
||||
|
||||
# The rest is shared between Windows and Unices
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
@@ -14,28 +14,22 @@
|
||||
# other shell scripts.
|
||||
#
|
||||
|
||||
# For specific stuff (currently kill HUP -> rdnc reload in notify)
|
||||
CYGWIN=1
|
||||
|
||||
# Find the top of the BIND9 tree.
|
||||
TOP=${SYSTEMTESTTOP:=.}/../../..
|
||||
|
||||
# Make it absolute so that it continues to work after we cd.
|
||||
TOP=`cd $TOP && pwd`
|
||||
|
||||
# This is the windows build. This disables certain tests cases
|
||||
# and changes some specific behaviors where necessary.
|
||||
CYGWIN=1
|
||||
|
||||
# Load common values shared between windows and unix/linux.
|
||||
. $TOP/bin/tests/system/conf.sh.common
|
||||
|
||||
# Visual Studio build configurations are Release and Debug
|
||||
VSCONF=Debug
|
||||
|
||||
# Default algorithm for testing
|
||||
DEFAULT_ALGORITHM=ECDSAP256SHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=13
|
||||
DEFAULT_BITS=256
|
||||
|
||||
# must be different from DEFAULT_ALGORITHM
|
||||
ALTERNATIVE_ALGORITHM=RSASHA256
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=8
|
||||
ALTERNATIVE_BITS=1280
|
||||
|
||||
ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@
|
||||
CDS=$TOP/Build/$VSCONF/dnssec-cds@EXEEXT@
|
||||
CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@
|
||||
@@ -88,47 +82,18 @@ PIPEQUERIES=$TOP/Build/$VSCONF/pipequeries@EXEEXT@
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=NUL
|
||||
|
||||
# The "stress" test is not run by default since it creates enough
|
||||
# load on the machine to make it unusable to other users.
|
||||
# The "dialup", "delzone", and "dupsigs" tests are also not run by
|
||||
# default because they take a very long time to complete.
|
||||
#
|
||||
# List of tests that use ports 5300 and 9953. For this reason, these must
|
||||
# be run sequentially.
|
||||
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
|
||||
# Construct the lists of tests to run
|
||||
#
|
||||
SEQUENTIAL_WINDOWS=""
|
||||
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS"
|
||||
|
||||
# List of tests that use unique ports (other than 5300 and 9953). These
|
||||
# tests can be run in parallel.
|
||||
#
|
||||
# XXX: Note that tests are not currently run in parallel on Windows, so it
|
||||
# isn't strictly necessary to maintain these as separate lists in this file,
|
||||
# but using the same variable names as in conf.sh.in may simplify keeping the
|
||||
# lists in sync.
|
||||
#
|
||||
# XXX: removed logfileconfig as it doesn't currently work on windows.
|
||||
PARALLELDIRS="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 idna inline integrity ixfr keepalive \
|
||||
legacy limits masterfile masterformat metadata mirror mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
padding pending pipelined qmin \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
serve-stale sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub synthfromdnssec \
|
||||
tcp tools tsig tsiggss ttl \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
PARALLEL_WINDOWS="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@"
|
||||
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS"
|
||||
|
||||
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
|
||||
|
||||
#Things that are different on Windows
|
||||
# Things that are different on Windows
|
||||
KILL="/bin/kill -f"
|
||||
DIFF="diff --strip-trailing-cr"
|
||||
DOS2UNIX=dos2unix
|
||||
|
||||
34
bin/tests/system/parallel.sh
Normal file
34
bin/tests/system/parallel.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# 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/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
. ./conf.sh
|
||||
|
||||
PARALLELS=`echo $PARALLELDIRS | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -`
|
||||
|
||||
echo ".PHONY: $PARALLELS"
|
||||
echo
|
||||
echo "check_interfaces:"
|
||||
echo " @${PERL} testsock.pl > /dev/null 2>&1 || { \\"
|
||||
echo " echo \"I:NOTE: System tests were skipped because they require the\"; \\"
|
||||
echo " echo \"I: test IP addresses 10.53.0.* to be configured as alias\"; \\"
|
||||
echo " echo \"I: addresses on the loopback interface. Please run\"; \\"
|
||||
echo " echo \"I: \"bin/tests/system/ifconfig.sh up\" as root to configure them.\"; \\"
|
||||
echo " exit 1; \\"
|
||||
echo " }"
|
||||
echo
|
||||
echo "test check: $PARALLELS"
|
||||
port=${STARTPORT:-5000}
|
||||
for directory in $PARALLELDIRS ; do
|
||||
echo
|
||||
echo "test-`echo $directory | tr _ -`: check_interfaces"
|
||||
echo " @${SHELL} ./run.sh -r -p $port $directory 2>&1 | tee $directory/test.output"
|
||||
port=`expr $port + 100`
|
||||
done
|
||||
@@ -68,21 +68,29 @@ export SYSTEMTEST_FORCE_COLOR
|
||||
export SYSTEMTEST_NO_CLEAN
|
||||
|
||||
status=0
|
||||
if [ "$CYGWIN" = "" ]; then
|
||||
# Running on Unix, use "make" to run tests in parallel.
|
||||
make -j $numproc check
|
||||
status=$?
|
||||
|
||||
if [ "$NOPARALLEL" = "" ]; then
|
||||
if [ "$CYGWIN" = "" ]; then
|
||||
# Running on Unix, use "make" to run tests in parallel.
|
||||
make -j $numproc check
|
||||
status=$?
|
||||
else
|
||||
# Running on Windows: Cygwin "make" is available, but isn't being
|
||||
# used for the build. So we create a special makefile for the purpose
|
||||
# of parallel execution of system tests, and use that.
|
||||
$SHELL parallel.sh > parallel.mk
|
||||
make -f parallel.mk -j $numproc check || status=$?
|
||||
$SHELL ./runsequential.sh -r || status=$?
|
||||
$SHELL ./testsummary.sh
|
||||
fi
|
||||
else
|
||||
# Running on Windows: no "make" available, so ensure test interfaces are up
|
||||
# and then run the tests sequentially. (This is simpler than working out
|
||||
# where "nmake" is likely to be found. Besides, "nmake" does not support
|
||||
# parallel execution so if "nmake" is used, the tests would be run
|
||||
# sequentially anyway.)
|
||||
# the NOPARALLEL environment variable indicates that tests must be
|
||||
# run sequentially.
|
||||
$PERL testsock.pl || {
|
||||
cat <<-EOF
|
||||
I:NOTE: System tests were skipped because they require that the
|
||||
I: IP addresses 10.53.0.1 through 10.53.0.8 be configured
|
||||
I: as alias addresses on the loopback interface. Please run
|
||||
I:NOTE: System tests were skipped because they require the
|
||||
I: test IP addresses 10.53.0.* to be configured as alias
|
||||
I: addresses on the loopback interface. Please run
|
||||
I: "bin/tests/system/ifconfig.sh up" as root to configure them.
|
||||
EOF
|
||||
exit 1
|
||||
@@ -93,4 +101,5 @@ else
|
||||
done
|
||||
} 2>&1 | tee "systests.output"
|
||||
fi
|
||||
|
||||
exit $status
|
||||
|
||||
@@ -877,6 +877,7 @@
|
||||
./bin/tests/system/padding/clean.sh SH 2017,2018,2019
|
||||
./bin/tests/system/padding/setup.sh SH 2017,2018,2019
|
||||
./bin/tests/system/padding/tests.sh SH 2017,2018,2019
|
||||
./bin/tests/system/parallel.sh SH 2019
|
||||
./bin/tests/system/pending/clean.sh SH 2009,2012,2014,2016,2018,2019
|
||||
./bin/tests/system/pending/ns1/sign.sh SH 2009,2010,2012,2014,2016,2018,2019
|
||||
./bin/tests/system/pending/ns2/sign.sh SH 2009,2010,2012,2014,2016,2017,2018,2019
|
||||
|
||||
Reference in New Issue
Block a user