mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests: don't call wait_for_container after synchronous operations
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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 ]
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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 ]
|
||||
|
||||
|
||||
@@ -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}""'"
|
||||
@@ -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}""'"
|
||||
@@ -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}""'"
|
||||
@@ -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"* ]]
|
||||
@@ -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" ]]
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ]
|
||||
|
||||
@@ -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}" == "" ]]
|
||||
@@ -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}" == "" ]]
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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"* ]]
|
||||
|
||||
@@ -17,8 +17,6 @@ function teardown() {
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# check state
|
||||
wait_for_container 15 1 test_busybox
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@@ -36,8 +34,6 @@ function teardown() {
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# check state
|
||||
wait_for_container 15 1 test_busybox
|
||||
|
||||
testcontainer test_busybox running
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -50,8 +48,6 @@ function teardown() {
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
# check state
|
||||
wait_for_container 15 1 test_busybox
|
||||
|
||||
testcontainer test_busybox running
|
||||
|
||||
# pause busybox
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user