diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index 2a8d658678..38e43f2abc 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -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 } diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index a9f88c2432..8cecc8f950 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -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,43 +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. -# -# Note: some of the longer-running tests such as serve-stale and -# rpzrecurse are scheduled first, in order to get more benefit from -# parallelism. -PARALLELDIRS="dnssec rpzrecurse serve-stale \ - 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" +PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig" +PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX" SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" @@ -138,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 diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 index 6fc4f617b7..4fae137596 100644 --- a/bin/tests/system/conf.sh.win32 +++ b/bin/tests/system/conf.sh.win32 @@ -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. -# -# Note: some of the longer-running tests such as serve-stale and -# rpzrecurse are scheduled first, in order to get more benefit from -# parallelism. -# -# XXX: removed logfileconfig as it doesn't currently work on windows. -PARALLELDIRS="dnssec rpzrecurse serve-stale \ - 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 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" +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