2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/scripts/fake-restore.sh
Andrey Vagin 6a66b87e12 zdtm: check an exit code of a straced restore
Currently zdtm doesn't detect when restore failed, if it is executed
with strace. With this patch, fake-restore.sh creates a test file, and
zdtm is able to distinguish when restore failed.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-12 11:45:31 +03:00

16 lines
382 B
Bash
Executable File

#!/bin/bash
#
# A stupid script to abort restore at the very end. Useful to test
# restore w/o letting the restored processes continue running. E.g.
# can be used to measure the restore time.
#
# Usage:
# criu restore <options> --action-script $(pwd)/scripts/fake-restore.sh
#
if [ "$CRTOOLS_SCRIPT_ACTION" == "post-restore" ]; then
touch restore-succeeded
exit 1
else
exit 0
fi