mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
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>
This commit is contained in:
parent
4960d44129
commit
6a66b87e12
@ -8,6 +8,7 @@
|
||||
# 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
|
||||
|
@ -959,7 +959,8 @@ class criu:
|
||||
grep_errors(os.path.join(__ddir, log))
|
||||
if ret == 0:
|
||||
return
|
||||
if self.__test.blocking() or (self.__sat and action == 'restore'):
|
||||
rst_succeeded = os.access(os.path.join(__ddir, "restore-succeeded"), os.F_OK)
|
||||
if self.__test.blocking() or (self.__sat and action == 'restore' and rst_succeeded):
|
||||
raise test_fail_expected_exc(action)
|
||||
else:
|
||||
raise test_fail_exc("CRIU %s" % action)
|
||||
|
Loading…
x
Reference in New Issue
Block a user