Run system tests with set -e

Ensure all shell system tests are executed with the errexit option set.
This prevents unchecked return codes from commands in the test from
interfering with the tests, since any failures need to be handled
explicitly.

(cherry picked from commit 01bc805f89)
This commit is contained in:
Tom Krizek 2023-06-07 15:35:57 +02:00
parent 7abd0723fc
commit d715bae429
No known key found for this signature in database
GPG key ID: 01623B9B652A20A7
96 changed files with 191 additions and 9 deletions

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"

View file

@ -52,6 +52,8 @@
# and querying as necessary.
#
set -e
. ../conf.sh
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,11 +11,11 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
set -e
status=0
n=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,11 +11,11 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
set -e
status=0
n=1

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+short -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck disable=SC1091
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+norec -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGCMD="$DIG @10.53.0.3 -p ${PORT} +tcp +tries=1 +time=1"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
#shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
#

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
# Set known locale for the tests

View file

@ -13,6 +13,7 @@
# Test of include statement with glob expression.
set -e
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +dnssec -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -16,6 +16,8 @@
# in the log file - need a better approach <sdm> - until then,
# if you add any tests above that point, you will break the test.
set -e
. ../conf.sh
wait_for_serial() (

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
dig_with_opts() {

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
# shellcheck source=kasp.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
# shellcheck source=kasp.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT} +tries=1 +time=2"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
# Test given condition. If true, test again after a second. Used for testing

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
pzone=parent.nil pfile=parent.db

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT} -b 10.53.0.1 +dnssec +time=2 +tries=1 +multi"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+nosea +stat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,8 +11,9 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# shellcheck disable=SC2034
set -e
# shellcheck disable=SC2034
. ../conf.sh
dig_plus_opts() {

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
# shellcheck source=kasp.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck disable=SC2086
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
dig_with_opts() {

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
n=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
# replace_data dname RR old_data new_data

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
MDIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=../conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# test response policy zones (RPZ)
# touch dnsrps-off to not test with DNSRPS

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# touch dnsrps-off to not test with DNSRPS
# touch dnsrps-only to not test with classic RPZ

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# test response rate limiting
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short +nocookie"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,11 +11,11 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
set -e
RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"
NAMED_DEFAULT_ARGS="-m record -d 99 -g -U 4"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
RNDCCMD="$RNDC -c ../common/rndc.conf -p ${CONTROLPORT} -s"

View file

@ -11,11 +11,11 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh
set -e
status=0
n=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
n=1

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGCMD="$DIG +tcp -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# set -e
#
# shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
# shellcheck disable=SC1091
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -13,6 +13,8 @@
# tests for TSIG-GSS updates
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -15,6 +15,8 @@
# ns2 = secondary with update forwarding disabled; not currently used
# ns3 = secondary with update forwarding enabled
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
failed () {
cat verify.out.$n | sed 's/^/D:/';

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
status=0

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
#shellcheck source=conf.sh
. ../conf.sh

View file

@ -11,6 +11,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -e
. ../conf.sh
DIGOPTS="-p ${PORT}"