tests/int/checkpoint.bats: fix showing logs on fail

This fixes the following issue with the test:

	not ok 12 checkpoint --lazy-pages and restore
	# (in test file tests/integration/checkpoint.bats, line 202)
	#   `[ $ret -eq 0 ]' failed
	...
	# grep: ./work-dir/restore.log: No such file or directory

One might think that `--work-path ./image-dir` is a mistake, but it's
not, since `criu lazy-pages -D ./image-dir` creates a socket in
./image-dir, and then `criu restore --lazy-pages` expects a socket in
the workdir.

Fixes: e232a71a3d
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2020-09-09 17:35:10 -07:00
parent 165ecd2639
commit bca5f24c99
+1 -1
View File
@@ -198,7 +198,7 @@ function simple_cr() {
# continue to run if the migration failed at some point.
ret=0
__runc --criu "$CRIU" restore -d --work-path ./image-dir --image-path ./image-dir --lazy-pages test_busybox_restore <&${in_r} >&${out_w} 2>&${out_w} || ret=$?
grep -B 5 Error ./work-dir/restore.log || true
grep -B 5 Error ./image-dir/restore.log || true
[ $ret -eq 0 ]
# busybox should be back up and running