Call clean.sh from all relevant setup.sh scripts

For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.

(cherry picked from commit a077a3ae8a)
This commit is contained in:
Michał Kępień
2019-02-28 12:51:36 +01:00
parent 4c50a8f8fb
commit beeaefb401
19 changed files with 38 additions and 4 deletions
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
copy_setports ../common/controls.conf.in ns2/controls.conf
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named01.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
. ./clean.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+2 -1
View File
@@ -10,7 +10,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
${SHELL} clean.sh
$SHELL clean.sh
cp -f ns1/dynamic.db.in ns1/dynamic.db
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
$DDNSCONFGEN -q -r $RANDFILE -z example.nil > ns1/ddns.key
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+1 -1
View File
@@ -10,7 +10,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -f clean.sh && $SHELL clean.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
rm -f ns1/*.db ns1/*.jnl ns3/*.jnl ns4/*.db ns4/*.jnl
cat <<EOF >ns1/named.conf
+2
View File
@@ -12,6 +12,8 @@
# shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh"
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL ./clean.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
infile=ns1/example.db.in
/bin/echo -n ${HSMPIN:-1234}> pin
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
infile=ns1/example.db.in
/bin/echo -n ${HSMPIN:-1234}> pin
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cp ns4/tld1.db ns4/tld.db
+2
View File
@@ -12,6 +12,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in tmp
sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' tmp > ns2/named.conf
+5
View File
@@ -9,6 +9,11 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh"
$SHELL clean.sh
#
# Set up test data for zone transfer quota tests.
#