Skip to content

Commit

Permalink
merge branch 'pr-1936'
Browse files Browse the repository at this point in the history
  Small fixes for CRIU based test cases

LGTMs: @crosbymichael @cyphar
Closes #1936
  • Loading branch information
cyphar committed Nov 20, 2018
2 parents ceefc3f + bc0b047 commit 73856f6
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/integration/checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ function teardown() {
# XXX: currently criu require root containers.
requires criu root

# criu does not work with external terminals so..
# setting terminal and root:readonly: to false

runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

Expand Down Expand Up @@ -51,8 +48,8 @@ function teardown() {
# XXX: currently criu require root containers.
requires criu root

# The changes to 'terminal' are needed for running in detached mode
sed -i 's;"terminal": true;"terminal": false;' config.json
sed -i 's;"readonly": true;"readonly": false;' config.json
sed -i 's/"sh"/"sh","-c","for i in `seq 10`; do read xxx || continue; echo ponG $xxx; done"/' config.json

# The following code creates pipes for stdin and stdout.
Expand All @@ -75,7 +72,7 @@ function teardown() {
echo -n > $fifo
unlink $fifo

# run busybox (not detached)
# run busybox
__runc run -d test_busybox <&60 >&51 2>&51
[ $? -eq 0 ]

Expand Down Expand Up @@ -134,7 +131,9 @@ function teardown() {
skip "this criu does not support lazy migration"
fi

# The changes to 'terminal' are needed for running in detached mode
sed -i 's;"terminal": true;"terminal": false;' config.json
# This should not be necessary: https://github.com/checkpoint-restore/criu/issues/575
sed -i 's;"readonly": true;"readonly": false;' config.json
sed -i 's/"sh"/"sh","-c","for i in `seq 10`; do read xxx || continue; echo ponG $xxx; done"/' config.json

Expand Down Expand Up @@ -252,8 +251,6 @@ function teardown() {

ns_inode=`ls -iL $ns_path | awk '{ print $1 }'`

# not necessary with criu 3.10 any more
sed -i 's;"readonly": true;"readonly": false;' config.json
# tell runc which network namespace to use
sed -i "s;\"type\": \"network\";\"type\": \"network\",\"path\": \"$ns_path\";" config.json

Expand Down

0 comments on commit 73856f6

Please sign in to comment.