[CRIU] [RFC] run each test case also in --check-only mode
Adrian Reber
adrian at lisas.de
Thu Mar 23 12:59:13 PDT 2017
The following patch tries to add the --check-only option to each test case.
For each test case now the following step are run:
* dump in --check-only mode
* real dump
* restore in --check-only mode
* real restore
With all five patches of this series during a run of zdtm only one test fails when
'--check-only' mode is enabled:
./zdtm.py run -f h,ns -a --check-only --keep-going
################### 1 TEST(S) FAILED (TOTAL 298/SKIPPED 35) ####################
* zdtm/static/unlink_fstat03(h)
##################################### FAIL #####################################
Not really sure how to fix this test case in '--check-only' mode:
===================== Run zdtm/static/unlink_fstat03 in h ======================
Start test
./unlink_fstat03 --pidfile=unlink_fstat03.pid --outfile=unlink_fstat03.out --filename=unlink_fstat03.test
Run criu dump in check-only mode
Only checking if requested operation will succeed
Run criu dump
Run criu restore in check-only mode
Only checking if requested operation will succeed
Checking mode enabled
Run criu restore
=[log]=> dump/zdtm/static/unlink_fstat03/30/1/restore.log
------------------------ grep Error ------------------------
(00.004796) 30: Error (criu/files-reg.c:1215): Can't link tmp/criu/test/zdtm/static/link_remap.8 -> tmp/criu/test/zdtm/static/unlink_fstat03.test (deleted): No such file or directory
(00.004800) 30: Error (criu/files-reg.c:1474): Can't link tmp/criu/test/zdtm/static/unlink_fstat03.test (deleted) -> tmp/criu/test/zdtm/static/link_remap.8: No such file or directory
(00.004820) Error (criu/cr-restore.c:2060): Restoring FAILED.
------------------------ ERROR OVER ------------------------
############# Test zdtm/static/unlink_fstat03 FAIL at CRIU restore #############
In check-only mode restore the --link-remap dump files are removed and thus
do not longer exist for the real restore. I tried a few things how handle this
better in --check-only mode but everything I tried created other errors.
So I am again asking for help: how to correctly handle the --link-remap files in
check-only mode. If I just skip the restore of the link-remap code path it fails
later because some other files (I guess created) by link-remap are missing.
I am not really sure what link-remap does and how to avoid this error
during restore. Any hints, ideas how to solve this are appreciated.
Is the link-remap option maybe something that needs to be already skipped
during dump for --check-only?
Adrian
More information about the CRIU
mailing list