[CRIU] [PATCH 1/2] test: add support for expecting dump failures

Tycho Andersen tycho.andersen at canonical.com
Fri Jun 26 16:29:55 PDT 2015


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: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/zdtm.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index f1653f9..01b5cc7 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -336,6 +336,9 @@ apparmor
 seccomp_strict
 "
 
+TEST_EXPECTED_FAILURE="
+"
+
 CRIU_CPT=$CRIU
 TMP_TREE=""
 SCRIPTDIR=`dirname $CRIU`/test
@@ -757,6 +760,11 @@ EOF
 		# with some error code, or checkpoint is complete but return
 		# code is non-zero because of post dump action.
 		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
 				echo WARNING: $tname returned $retcode and left running for debug needs
 			else
-- 
2.1.4



More information about the CRIU mailing list