Drop $SYSTEMTESTTOP from bin/tests/system/

The $SYSTEMTESTTOP shell variable if often set to .. in various shell
scripts inside bin/tests/system/, but most of the time it is only
used one line later, while sourcing conf.sh. This hardly improves
code readability.

$SYSTEMTESTTOP is also used for the purpose of referencing
scripts/files living in bin/tests/system/, but given that the
variable is always set to a short, relative path, we can drop it and
replace all of its occurrences with the relative path without adversely
affecting code readability.
parent c99381ce
...@@ -374,7 +374,7 @@ a run of the full test suite (e.g. the tests are started with "runall.sh"). ...@@ -374,7 +374,7 @@ a run of the full test suite (e.g. the tests are started with "runall.sh").
3. Each script should start with the following lines: 3. Each script should start with the following lines:
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
"conf.sh" defines a series of environment variables together with functions "conf.sh" defines a series of environment variables together with functions
useful for the test scripts. (conf.sh.win32 is the Windows equivalent of this useful for the test scripts. (conf.sh.win32 is the Windows equivalent of this
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
$SHELL clean.sh $SHELL clean.sh
$SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/example.db $SHELL ${TOP_SRCDIR}/bin/tests/system/genzone.sh 2 3 >ns2/example.db
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
status=0 status=0
t=0 t=0
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
$SHELL clean.sh $SHELL clean.sh
copy_setports ns1/named1.conf.in ns1/named.conf copy_setports ns1/named1.conf.in ns1/named.conf
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="-p ${PORT}" DIGOPTS="-p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
status=0 status=0
n=0 n=0
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
cp -f ns1/redirect.db.1 ns1/redirect.db cp -f ns1/redirect.db.1 ns1/redirect.db
cp -f ns2/redirect.db.1 ns2/redirect.db cp -f ns2/redirect.db.1 ns2/redirect.db
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}" DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
check_zonestatus() ( check_zonestatus() (
$RNDCCMD "10.53.0.$1" zonestatus -redirect > "zonestatus.out.ns$1.$n" && $RNDCCMD "10.53.0.$1" zonestatus -redirect > "zonestatus.out.ns$1.$n" &&
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ../common/controls.conf.in ns2/controls.conf copy_setports ../common/controls.conf.in ns2/controls.conf
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
# and querying as necessary. # and querying as necessary.
# #
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}" DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="+tcp -p ${PORT}" DIGOPTS="+tcp -p ${PORT}"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../../conf.sh
zone=. zone=.
zonefile=root.db zonefile=root.db
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../../conf.sh
# Have the child generate subdomain keys and pass DS sets to us. # Have the child generate subdomain keys and pass DS sets to us.
( cd ../ns3 && $SHELL keygen.sh ) ( cd ../ns3 && $SHELL keygen.sh )
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../../conf.sh
SYSTESTDIR=autosign SYSTESTDIR=autosign
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0
n=0 n=0
DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}" DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
# convert private-type records to readable form # convert private-type records to readable form
showprivate () { showprivate () {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="-p ${PORT}" DIGOPTS="-p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
status=0 status=0
n=0 n=0
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0
n=0 n=0
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
cp -f ns1/dynamic.db.in ns1/dynamic.db cp -f ns1/dynamic.db.in ns1/dynamic.db
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
$SHELL clean.sh $SHELL clean.sh
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
set -e set -e
# shellcheck source=conf.sh # shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh" . ../conf.sh
dig_with_opts() { dig_with_opts() {
"$DIG" -p "${PORT}" "$@" "$DIG" -p "${PORT}" "$@"
} }
rndccmd() ( rndccmd() (
"$RNDC" -c "$SYSTEMTESTTOP/common/rndc.conf" -p "${CONTROLPORT}" -s "$@" "$RNDC" -c ../common/rndc.conf -p "${CONTROLPORT}" -s "$@"
) )
_wait_for_message() ( _wait_for_message() (
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
set -eu set -eu
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
touch empty touch empty
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0
n=0 n=0
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../../conf.sh
zone=example. zone=example.
zonefile=example.db zonefile=example.db
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
copy_setports ns1/named.conf.in ns1/named.conf copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf copy_setports ns2/named.conf.in ns2/named.conf
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
DIGOPTS="-p ${PORT}" DIGOPTS="-p ${PORT}"
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s" RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
sendcmd() { sendcmd() {
send 10.53.0.4 "${EXTRAPORT1}" send 10.53.0.4 "${EXTRAPORT1}"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0
n=0 n=0
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
$SHELL clean.sh $SHELL clean.sh
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0
n=1 n=1
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
ln -s $CHECKZONE named-compilezone ln -s $CHECKZONE named-compilezone
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional # See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership. # information regarding copyright ownership.
. $SYSTEMTESTTOP/conf.sh . ../conf.sh
status=0 status=0