Merge branch '4229-nextpart-failed-set-e-fallout' into 'main'

Resolve "nextpart failed, set -e fallout?"

Closes #4229

See merge request isc-projects/bind9!8149
This commit is contained in:
Mark Andrews 2023-08-02 00:21:26 +00:00
commit cd0f115082
3 changed files with 15 additions and 14 deletions

View file

@ -998,6 +998,7 @@ status=$((status + ret))
echo_i "checking scheduled key activation ($n)"
ret=0
sleep 1 # ensure file system time stamp of ns3/delay.example.db changes
$SETTIME -K ns3 -A now $zsk > settime.out.test$n.zsk || ret=1
$SETTIME -K ns3 -A now $ksk > settime.out.test$n.ksk || ret=1
cp ns3/delay.example.db ns3/delay.example.2

View file

@ -129,13 +129,13 @@ zonechecks"
# Set up color-coded test output
#
if [ ${SYSTEMTEST_FORCE_COLOR:-0} -eq 1 ] || test -t 1 && type tput > /dev/null 2>&1 && tput setaf 7 > /dev/null 2>&1 ; then
export COLOR_END=`tput setaf 4` # blue
export COLOR_FAIL=`tput setaf 1` # red
export COLOR_INFO=`tput bold` # bold
export COLOR_NONE=`tput sgr0`
export COLOR_PASS=`tput setaf 2` # green
export COLOR_START=`tput setaf 4` # blue
export COLOR_WARN=`tput setaf 3` # yellow
export COLOR_END=$(tput setaf 4) # blue
export COLOR_FAIL=$(tput setaf 1) # red
export COLOR_INFO=$(tput bold) # bold
export COLOR_NONE=$(tput sgr0)
export COLOR_PASS=$(tput setaf 2) # green
export COLOR_START=$(tput setaf 4) # blue
export COLOR_WARN=$(tput setaf 3) # yellow
else
# set to empty strings so printf succeeds
export COLOR_END=''
@ -147,7 +147,7 @@ else
export COLOR_WARN=''
fi
export SYSTESTDIR="`basename $PWD`"
export SYSTESTDIR="$(basename $PWD)"
if type printf > /dev/null 2>&1
then
@ -238,7 +238,7 @@ cat_d() {
}
digcomp() {
{ output=`$PERL $TOP_SRCDIR/bin/tests/system/digcomp.pl "$@"`; result=$?; } || true
{ output=$($PERL $TOP_SRCDIR/bin/tests/system/digcomp.pl "$@"); result=$?; } || true
[ -n "$output" ] && { echo "digcomp failed:"; echo "$output"; } | cat_i
return $result
}
@ -472,7 +472,7 @@ nextpartreset() {
# total number of lines read from that file so far to file descriptor 3
nextpartread() {
[ -f $1.prev ] || nextpartreset $1
prev=`cat $1.prev`
prev=$(cat $1.prev)
awk "NR > $prev "'{ print }
END { print NR > "/dev/stderr" }' $1 2>&3
}
@ -678,8 +678,8 @@ get_dig_xfer_stats() {
# them to a format used by some system tests.
get_named_xfer_stats() {
LOGFILE="$1"
PEER="`echo $2 | sed 's/\./\\\\./g'`"
ZONE="`echo $3 | sed 's/\./\\\\./g'`"
PEER="$(echo $2 | sed 's/\./\\./g')"
ZONE="$(echo $3 | sed 's/\./\\./g')"
MESSAGE="$4"
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) messages.*/messages=\1/p" | tail -1

View file

@ -1684,7 +1684,7 @@ send
END
grep 'status: REFUSED' nsupdate.out.test$n > /dev/null || ret=1
msg="update failed: _dns.ns.example/SVCB: no ALPN (REFUSED)"
nextpart ns3/named.run | grep "$msg" ns3/named.run > /dev/null || ret=1
nextpart ns3/named.run | grep "$msg" > /dev/null || ret=1
[ $ret = 0 ] || { echo_i "failed"; status=1; }
n=$((n + 1))
@ -1714,7 +1714,7 @@ send
END
grep 'status: REFUSED' nsupdate.out.test$n > /dev/null || ret=1
msg="update failed: _dns.ns.example/SVCB: no DOHPATH (REFUSED)"
nextpart ns3/named.run | grep "$msg" ns3/named.run > /dev/null || ret=1
nextpart ns3/named.run | grep "$msg" > /dev/null || ret=1
[ $ret = 0 ] || { echo_i "failed"; status=1; }
n=$((n + 1))