Skip to content

Commit

Permalink
Merge pull request #1484 from avagin/test
Browse files Browse the repository at this point in the history
tests: redirect runc log messages to stderr
  • Loading branch information
Mrunal Patel authored Jun 20, 2017
2 parents 035b578 + 76d8797 commit 17f3e2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
22 changes: 5 additions & 17 deletions tests/integration/checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

runc state test_busybox
[ "$status" -eq 0 ]
[[ "${output}" == *"running"* ]]
testcontainer test_busybox running

for i in `seq 2`; do
# checkpoint the running container
Expand All @@ -40,19 +35,12 @@ function teardown() {
[ "$status" -ne 0 ]

# restore from checkpoint
(
runc --criu "$CRIU" restore -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]
) &
runc --criu "$CRIU" restore -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox
# busybox should be back up and running
testcontainer test_busybox running
done

# busybox should be back up and running
runc state test_busybox
[ "$status" -eq 0 ]
[[ "${output}" == *"running"* ]]
}

@test "checkpoint --pre-dump and restore" {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function runc() {

# Raw wrapper for runc.
function __runc() {
"$RUNC" --root "$ROOT" "$@"
"$RUNC" --log /proc/self/fd/2 --root "$ROOT" "$@"
}

# Wrapper for runc spec.
Expand Down

0 comments on commit 17f3e2a

Please sign in to comment.