Skip to content

Commit

Permalink
tests/int/checkpoint: rm double logging
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kolyshkin committed Apr 25, 2024
1 parent 52bd9fd commit e5c82f0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/integration/checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ function runc_restore_with_pipes() {
echo "__runc restore $name failed (status: $ret)"
exec {err_w}>&-
cat <&${err_r}
echo "CRIU log errors (if any):"
grep -B 5 Error "$workdir"/*.log ./image-dir/*.log || true
fail "runc restore failed"
fi

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

# after checkpoint busybox is no longer running
testcontainer test_busybox checkpointed

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

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

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

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

# after checkpoint busybox is no longer running
testcontainer test_busybox checkpointed

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

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

# checkpoint the running container
runc checkpoint --work-path ./work-dir test_busybox
grep -B 5 Error ./work-dir/dump.log || true
[ "$status" -eq 0 ]
run ! test -f ./work-dir/"$tmplog1"
test -f ./work-dir/"$tmplog2"
Expand All @@ -364,7 +354,6 @@ function simple_cr() {
test -f ./work-dir/"$tmplog2" && unlink ./work-dir/"$tmplog2"
# restore from checkpoint
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
grep -B 5 Error ./work-dir/restore.log || true
[ "$status" -eq 0 ]
run ! test -f ./work-dir/"$tmplog1"
test -f ./work-dir/"$tmplog2"
Expand Down Expand Up @@ -398,7 +387,6 @@ function simple_cr() {

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

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

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

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

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

Expand Down

0 comments on commit e5c82f0

Please sign in to comment.