]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify trailing period handling in system tests
authorMichał Kępień <michal@isc.org>
Fri, 26 Apr 2019 18:38:02 +0000 (20:38 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 26 Apr 2019 18:38:02 +0000 (20:38 +0200)
commitda2c1b74ada4f0899ff10d8f78b22beb4c4ce693
treea04da78e2240d50237afc0f1f867f515c2a69baf
parent79357f93c0e2488614450561c1b0bfa51b2b9de3
Simplify trailing period handling in system tests

Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.
bin/tests/system/dlv/ns3/sign.sh
bin/tests/system/dnssec/ns2/sign.sh
bin/tests/system/dnssec/ns3/sign.sh
bin/tests/system/dsdigest/ns2/sign.sh
bin/tests/system/rpz/setup.sh
bin/tests/system/wildcard/ns1/sign.sh