Commit 6e218166 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

test: add support for expecting dump failures

We'll use this in the next patch when testing the creds comparison for
threads.

v2: use an explicit list in zdtm.sh instead of a file in the test dir
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f231a119
...@@ -345,6 +345,9 @@ apparmor ...@@ -345,6 +345,9 @@ apparmor
seccomp_strict seccomp_strict
" "
TEST_EXPECTED_FAILURE="
"
CRIU_CPT=$CRIU CRIU_CPT=$CRIU
TMP_TREE="" TMP_TREE=""
SCRIPTDIR=`dirname $CRIU`/test SCRIPTDIR=`dirname $CRIU`/test
...@@ -766,6 +769,11 @@ EOF ...@@ -766,6 +769,11 @@ EOF
# with some error code, or checkpoint is complete but return # with some error code, or checkpoint is complete but return
# code is non-zero because of post dump action. # code is non-zero because of post dump action.
if [ "$retcode" -ne 0 ] && [[ "$retcode" -ne 32 || -z "$dump_only" ]]; then if [ "$retcode" -ne 0 ] && [[ "$retcode" -ne 32 || -z "$dump_only" ]]; then
if echo $TEST_EXPECTED_FAILURE | grep -q $tname; then
echo "Got expected dump failure"
return 0
fi
if [ $BATCH_TEST -eq 0 ]; then if [ $BATCH_TEST -eq 0 ]; then
echo WARNING: $tname returned $retcode and left running for debug needs echo WARNING: $tname returned $retcode and left running for debug needs
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment