Skip to content

Commit e5c82f0

Browse files
committed
tests/int/checkpoint: rm double logging
Since commit c77aaa3 the tail of criu.log is printed by runc, so there's no need to do the same thing in tests. Related to 3711, 3816. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 52bd9fd commit e5c82f0

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

tests/integration/checkpoint.bats

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ function runc_restore_with_pipes() {
8989
echo "__runc restore $name failed (status: $ret)"
9090
exec {err_w}>&-
9191
cat <&${err_r}
92-
echo "CRIU log errors (if any):"
93-
grep -B 5 Error "$workdir"/*.log ./image-dir/*.log || true
9492
fail "runc restore failed"
9593
fi
9694

@@ -110,15 +108,13 @@ function simple_cr() {
110108
for _ in $(seq 2); do
111109
# checkpoint the running container
112110
runc "$@" checkpoint --work-path ./work-dir test_busybox
113-
grep -B 5 Error ./work-dir/dump.log || true
114111
[ "$status" -eq 0 ]
115112

116113
# after checkpoint busybox is no longer running
117114
testcontainer test_busybox checkpointed
118115

119116
# restore from checkpoint
120117
runc "$@" restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
121-
grep -B 5 Error ./work-dir/restore.log || true
122118
[ "$status" -eq 0 ]
123119

124120
# busybox should be back up and running
@@ -188,7 +184,6 @@ function simple_cr() {
188184
mkdir image-dir
189185
mkdir work-dir
190186
runc checkpoint --parent-path ../parent-dir --work-path ./work-dir --image-path ./image-dir test_busybox
191-
grep -B 5 Error ./work-dir/dump.log || true
192187
[ "$status" -eq 0 ]
193188

194189
# check parent path is valid
@@ -240,8 +235,6 @@ function simple_cr() {
240235
exec {lazy_w}>&-
241236
# shellcheck disable=SC2116,SC2086
242237
out=$(echo $out) # rm newlines
243-
# show errors if there are any before we fail
244-
grep -B5 Error ./work-dir/dump.log || true
245238
# expecting \0 which od prints as
246239
[ "$out" = "0000000 000000 0000001" ]
247240

@@ -302,15 +295,13 @@ function simple_cr() {
302295
# checkpoint the running container; this automatically tells CRIU to
303296
# handle the network namespace defined in config.json as an external
304297
runc checkpoint --work-path ./work-dir test_busybox
305-
grep -B 5 Error ./work-dir/dump.log || true
306298
[ "$status" -eq 0 ]
307299

308300
# after checkpoint busybox is no longer running
309301
testcontainer test_busybox checkpointed
310302

311303
# restore from checkpoint; this should restore the container into the existing network namespace
312304
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
313-
grep -B 5 Error ./work-dir/restore.log || true
314305
[ "$status" -eq 0 ]
315306

316307
# busybox should be back up and running
@@ -353,7 +344,6 @@ function simple_cr() {
353344

354345
# checkpoint the running container
355346
runc checkpoint --work-path ./work-dir test_busybox
356-
grep -B 5 Error ./work-dir/dump.log || true
357347
[ "$status" -eq 0 ]
358348
run ! test -f ./work-dir/"$tmplog1"
359349
test -f ./work-dir/"$tmplog2"
@@ -364,7 +354,6 @@ function simple_cr() {
364354
test -f ./work-dir/"$tmplog2" && unlink ./work-dir/"$tmplog2"
365355
# restore from checkpoint
366356
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
367-
grep -B 5 Error ./work-dir/restore.log || true
368357
[ "$status" -eq 0 ]
369358
run ! test -f ./work-dir/"$tmplog1"
370359
test -f ./work-dir/"$tmplog2"
@@ -398,7 +387,6 @@ function simple_cr() {
398387

399388
# checkpoint the running container
400389
runc checkpoint --work-path ./work-dir test_busybox
401-
grep -B 5 Error ./work-dir/dump.log || true
402390
[ "$status" -eq 0 ]
403391

404392
# after checkpoint busybox is no longer running
@@ -410,7 +398,6 @@ function simple_cr() {
410398

411399
# restore from checkpoint
412400
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
413-
grep -B 5 Error ./work-dir/restore.log || true
414401
[ "$status" -eq 0 ]
415402

416403
# busybox should be back up and running
@@ -430,7 +417,6 @@ function simple_cr() {
430417
test -d "$orig_path"
431418

432419
runc checkpoint --work-path ./work-dir --manage-cgroups-mode ignore test_busybox
433-
grep -B 5 Error ./work-dir/dump.log || true
434420
[ "$status" -eq 0 ]
435421
testcontainer test_busybox checkpointed
436422
# Check that the cgroup is gone.
@@ -440,7 +426,6 @@ function simple_cr() {
440426
set_cgroups_path # Changes the path.
441427
runc restore -d --manage-cgroups-mode ignore --pid-file pid \
442428
--work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
443-
grep -B 5 Error ./work-dir/restore.log || true
444429
[ "$status" -eq 0 ]
445430
testcontainer test_busybox running
446431

0 commit comments

Comments
 (0)