2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 16:15:27 +00:00

Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected' into 'master'

Always fail a system test if crashes are detected

Closes #1088

See merge request isc-projects/bind9!2041
This commit is contained in:
Michał Kępień
2019-06-18 03:55:20 -04:00

View File

@@ -188,19 +188,30 @@ status=`expr $status + $?`
if [ $status != 0 ]; then if [ $status != 0 ]; then
echofail "R:$systest:FAIL" echofail "R:$systest:FAIL"
# Do not clean up - we need the evidence. # Do not clean up - we need the evidence.
find . -name core -exec chmod 0644 '{}' \;
else else
echopass "R:$systest:PASS" core_dumps="$(find $systest/ -name 'core*' | sort | tr '\n' ' ')"
if $clean assertion_failures=$(find $systest/ -name named.run | xargs grep "assertion failure" | wc -l)
then if [ -n "$core_dumps" ]; then
$SHELL clean.sh $runall $systest "$@" echoinfo "I:$systest:Test claims success despite crashes: $core_dumps"
if test -d ../../../.git echofail "R:$systest:FAIL"
then # Do not clean up - we need the evidence.
git status -su --ignored $systest 2>/dev/null | \ elif [ $assertion_failures -ne 0 ]; then
sed -n -e 's|^?? \(.*\)|I:file \1 not removed|p' \ echoinfo "I:$systest:Test claims success despite $assertion_failures assertion failure(s)"
-e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \ echofail "R:$systest:FAIL"
-e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p' # Do not clean up - we need the evidence.
fi else
echopass "R:$systest:PASS"
if $clean
then
$SHELL clean.sh $runall $systest "$@"
if test -d ../../../.git
then
git status -su --ignored $systest 2>/dev/null | \
sed -n -e 's|^?? \(.*\)|I:file \1 not removed|p' \
-e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \
-e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p'
fi
fi
fi fi
fi fi