mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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
509fac32dd
commit
251dad530b
2 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -984,7 +984,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…
Add table
Add a link
Reference in a new issue