mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
test/dump-crash: check code path when dump crashes
Signed-off-by: Bhavik Sachdev <b.sachdev1904@gmail.com>
This commit is contained in:
parent
a252a240c3
commit
f171649264
@ -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);
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user