diff --git a/criu/cr-dump.c b/criu/cr-dump.c index 199ff2e32..ef3b5480f 100644 --- a/criu/cr-dump.c +++ b/criu/cr-dump.c @@ -2102,6 +2102,10 @@ static int cr_dump_finish(int ret) close_image_dir(); if (ret || post_dump_ret) { + if (fault_injected(FI_DUMP_CRASH)) { + pr_info("fault: CRIU dump crashed!\n"); + abort(); + } pr_err("Dumping FAILED.\n"); } else { write_stats(DUMP_STATS); diff --git a/criu/include/fault-injection.h b/criu/include/fault-injection.h index fe75dfe86..552ee4338 100644 --- a/criu/include/fault-injection.h +++ b/criu/include/fault-injection.h @@ -20,6 +20,7 @@ enum faults { FI_CANNOT_MAP_VDSO = 133, FI_CORRUPT_EXTREGS = 134, FI_DONT_USE_PAGEMAP_SCAN = 135, + FI_DUMP_CRASH = 136, FI_MAX, }; diff --git a/test/jenkins/criu-fault.sh b/test/jenkins/criu-fault.sh index 4a6d55e6b..1fda40a96 100755 --- a/test/jenkins/criu-fault.sh +++ b/test/jenkins/criu-fault.sh @@ -39,3 +39,7 @@ fi ./test/zdtm.py run -t zdtm/static/fpu03 --fault 134 -f h --norst || fail # also check for the main thread corruption ./test/zdtm.py run -t zdtm/static/fpu00 --fault 134 -f h --norst || fail + +if ./test/zdtm.py run -t zdtm/static/vfork00 --fault 136 --report report -f h ; then + fail +fi