[CRIU] [PATCH 5/6] test: add support for expecting dump failures

Tycho Andersen tycho.andersen at canonical.com
Thu Jun 18 10:59:20 PDT 2015


We'll use this in the next patch when testing the creds comparison for
threads. I'm not sure if we want to keep adding files with special
extensions like this, or invent some whole new metadata format. Anyway,
maybe this is ok for now.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 test/zdtm.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index f1653f9..48f4451 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -757,6 +757,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 [ -f "$test".expectdumpfail ]; 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