Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: don't call wait_for_container after synchronous operations #1433

Merged
merged 2 commits into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tests: don't call wait_for_container after synchronous operations
Signed-off-by: Andrei Vagin <[email protected]>
  • Loading branch information
avagin committed May 2, 2017
commit abd05158162eb78b5ddbcafdab575f61105f31be
2 changes: 0 additions & 2 deletions tests/integration/cgroups.bats
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ EOF
# run a detached busybox to work with
runc run -d --console-socket $CONSOLE_SOCKET test_cgroups_kmem
[ "$status" -eq 0 ]
wait_for_container 15 1 test_cgroups_kmem

# update kernel memory limit
runc update test_cgroups_kmem --kernel-memory 50331648
Expand All @@ -67,7 +66,6 @@ EOF
# run a detached busybox to work with
runc run -d --console-socket $CONSOLE_SOCKET test_cgroups_kmem
[ "$status" -eq 0 ]
wait_for_container 15 1 test_cgroups_kmem

# update kernel memory limit
runc update test_cgroups_kmem --kernel-memory 50331648
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/delete.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc kill test_busybox KILL
Expand All @@ -40,8 +38,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

# force delete test_busybox
Expand Down
12 changes: 0 additions & 12 deletions tests/integration/events.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# generate stats
runc events --stats test_busybox
[ "$status" -eq 0 ]
Expand All @@ -37,9 +34,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# spawn two sub processes (shells)
# the first sub process is an event logger that sends stats events to events.log
# the second sub process waits for an event that incudes test_busybox then
Expand Down Expand Up @@ -67,9 +61,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# spawn two sub processes (shells)
# the first sub process is an event logger that sends stats events to events.log once a second
# the second sub process tries 3 times for an event that incudes test_busybox
Expand All @@ -96,9 +87,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

#prove there is no carry over of events.log from a prior test
[ ! -e events.log ]

Expand Down
14 changes: 0 additions & 14 deletions tests/integration/exec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec test_busybox echo Hello from exec
[ "$status" -eq 0 ]
echo text echoed = "'""${output}""'"
Expand All @@ -29,8 +27,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec --pid-file pid.txt test_busybox echo Hello from exec
[ "$status" -eq 0 ]
echo text echoed = "'""${output}""'"
Expand All @@ -56,8 +52,6 @@ function teardown() {
runc run -d -b $BUSYBOX_BUNDLE --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec --pid-file pid.txt test_busybox echo Hello from exec
[ "$status" -eq 0 ]
echo text echoed = "'""${output}""'"
Expand All @@ -77,8 +71,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec test_busybox ls -la
[ "$status" -eq 0 ]
[[ ${lines[0]} == *"total"* ]]
Expand All @@ -91,8 +83,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec --cwd /bin test_busybox pwd
[ "$status" -eq 0 ]
[[ ${output} == "/bin" ]]
Expand All @@ -103,8 +93,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec --env RUNC_EXEC_TEST=true test_busybox env
[ "$status" -eq 0 ]

Expand All @@ -119,8 +107,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec --user 1000:1000 test_busybox id
[ "$status" -eq 0 ]

Expand Down
2 changes: 0 additions & 2 deletions tests/integration/kill.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc kill test_busybox KILL
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ function teardown() {
# run a few busyboxes detached
ROOT=$HELLO_BUNDLE runc run -d --console-socket $CONSOLE_SOCKET test_box1
[ "$status" -eq 0 ]
wait_for_container_inroot 15 1 test_box1 $HELLO_BUNDLE

ROOT=$HELLO_BUNDLE runc run -d --console-socket $CONSOLE_SOCKET test_box2
[ "$status" -eq 0 ]
wait_for_container_inroot 15 1 test_box2 $HELLO_BUNDLE

ROOT=$HELLO_BUNDLE runc run -d --console-socket $CONSOLE_SOCKET test_box3
[ "$status" -eq 0 ]
wait_for_container_inroot 15 1 test_box3 $HELLO_BUNDLE

ROOT=$HELLO_BUNDLE runc list
[ "$status" -eq 0 ]
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/mask.bats
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec test_busybox cat /testfile
[ "$status" -eq 0 ]
[[ "${output}" == "" ]]
Expand All @@ -43,8 +41,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox

runc exec test_busybox ls /testdir
[ "$status" -eq 0 ]
[[ "${output}" == "" ]]
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/pause.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox
testcontainer test_busybox running

# pause busybox
runc pause test_busybox
Expand All @@ -44,7 +44,7 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

wait_for_container 15 1 test_busybox
testcontainer test_busybox running

# pause test_busybox and nonexistent container
runc pause test_busybox
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/ps.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc ps test_busybox
Expand All @@ -39,8 +37,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc ps -f json test_busybox
Expand All @@ -57,8 +53,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc ps test_busybox -e -x
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/root.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state of the busyboxes are only in their respective root path
wait_for_container 15 1 test_busybox
wait_for_container_inroot 15 1 test_dotbox $HELLO_BUNDLE

runc state test_busybox
[ "$status" -eq 0 ]
[[ "${output}" == *"running"* ]]
Expand Down
8 changes: 0 additions & 8 deletions tests/integration/start_detached.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running
}

Expand All @@ -36,8 +34,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running
}

Expand All @@ -47,8 +43,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

# check pid.txt was generated
Expand All @@ -71,8 +65,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

# check pid.txt was generated
Expand Down
4 changes: 0 additions & 4 deletions tests/integration/state.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

runc kill test_busybox KILL
Expand Down Expand Up @@ -50,8 +48,6 @@ function teardown() {
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

testcontainer test_busybox running

# pause busybox
Expand Down
9 changes: 0 additions & 9 deletions tests/integration/tty.bats
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# make sure we're running
testcontainer test_busybox running

Expand All @@ -87,9 +84,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# make sure we're running
testcontainer test_busybox running

Expand All @@ -113,9 +107,6 @@ function teardown() {
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
[ "$status" -eq 0 ]

# check state
wait_for_container 15 1 test_busybox

# make sure we're running
testcontainer test_busybox running

Expand Down
2 changes: 0 additions & 2 deletions tests/integration/update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function check_cgroup_value() {
# run a few busyboxes detached
runc run -d --console-socket $CONSOLE_SOCKET test_update
[ "$status" -eq 0 ]
wait_for_container 15 1 test_update

# get the cgroup paths
for g in MEMORY CPUSET CPU BLKIO PIDS; do
Expand Down Expand Up @@ -266,7 +265,6 @@ EOF
# run a detached busybox
runc run -d --console-socket $CONSOLE_SOCKET test_update_rt
[ "$status" -eq 0 ]
wait_for_container 15 1 test_update_rt

# get the cgroup paths
eval CGROUP_CPU="${CGROUP_CPU_BASE_PATH}/runc-update-integration-test"
Expand Down