Skip to content

Commit abd0515

Browse files
committed
tests: don't call wait_for_container after synchronous operations
Signed-off-by: Andrei Vagin <[email protected]>
1 parent efb2bc3 commit abd0515

File tree

14 files changed

+2
-76
lines changed

14 files changed

+2
-76
lines changed

tests/integration/cgroups.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ EOF
4747
# run a detached busybox to work with
4848
runc run -d --console-socket $CONSOLE_SOCKET test_cgroups_kmem
4949
[ "$status" -eq 0 ]
50-
wait_for_container 15 1 test_cgroups_kmem
5150

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

7270
# update kernel memory limit
7371
runc update test_cgroups_kmem --kernel-memory 50331648

tests/integration/delete.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ function teardown() {
1717
[ "$status" -eq 0 ]
1818

1919
# check state
20-
wait_for_container 15 1 test_busybox
21-
2220
testcontainer test_busybox running
2321

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

4240
# check state
43-
wait_for_container 15 1 test_busybox
44-
4541
testcontainer test_busybox running
4642

4743
# force delete test_busybox

tests/integration/events.bats

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ function teardown() {
1919
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
2020
[ "$status" -eq 0 ]
2121

22-
# check state
23-
wait_for_container 15 1 test_busybox
24-
2522
# generate stats
2623
runc events --stats test_busybox
2724
[ "$status" -eq 0 ]
@@ -37,9 +34,6 @@ function teardown() {
3734
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
3835
[ "$status" -eq 0 ]
3936

40-
# check state
41-
wait_for_container 15 1 test_busybox
42-
4337
# spawn two sub processes (shells)
4438
# the first sub process is an event logger that sends stats events to events.log
4539
# the second sub process waits for an event that incudes test_busybox then
@@ -67,9 +61,6 @@ function teardown() {
6761
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
6862
[ "$status" -eq 0 ]
6963

70-
# check state
71-
wait_for_container 15 1 test_busybox
72-
7364
# spawn two sub processes (shells)
7465
# the first sub process is an event logger that sends stats events to events.log once a second
7566
# the second sub process tries 3 times for an event that incudes test_busybox
@@ -96,9 +87,6 @@ function teardown() {
9687
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
9788
[ "$status" -eq 0 ]
9889

99-
# check state
100-
wait_for_container 15 1 test_busybox
101-
10290
#prove there is no carry over of events.log from a prior test
10391
[ ! -e events.log ]
10492

tests/integration/exec.bats

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ function teardown() {
1616
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
1717
[ "$status" -eq 0 ]
1818

19-
wait_for_container 15 1 test_busybox
20-
2119
runc exec test_busybox echo Hello from exec
2220
[ "$status" -eq 0 ]
2321
echo text echoed = "'""${output}""'"
@@ -29,8 +27,6 @@ function teardown() {
2927
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
3028
[ "$status" -eq 0 ]
3129

32-
wait_for_container 15 1 test_busybox
33-
3430
runc exec --pid-file pid.txt test_busybox echo Hello from exec
3531
[ "$status" -eq 0 ]
3632
echo text echoed = "'""${output}""'"
@@ -56,8 +52,6 @@ function teardown() {
5652
runc run -d -b $BUSYBOX_BUNDLE --console-socket $CONSOLE_SOCKET test_busybox
5753
[ "$status" -eq 0 ]
5854

59-
wait_for_container 15 1 test_busybox
60-
6155
runc exec --pid-file pid.txt test_busybox echo Hello from exec
6256
[ "$status" -eq 0 ]
6357
echo text echoed = "'""${output}""'"
@@ -77,8 +71,6 @@ function teardown() {
7771
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
7872
[ "$status" -eq 0 ]
7973

80-
wait_for_container 15 1 test_busybox
81-
8274
runc exec test_busybox ls -la
8375
[ "$status" -eq 0 ]
8476
[[ ${lines[0]} == *"total"* ]]
@@ -91,8 +83,6 @@ function teardown() {
9183
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
9284
[ "$status" -eq 0 ]
9385

94-
wait_for_container 15 1 test_busybox
95-
9686
runc exec --cwd /bin test_busybox pwd
9787
[ "$status" -eq 0 ]
9888
[[ ${output} == "/bin" ]]
@@ -103,8 +93,6 @@ function teardown() {
10393
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
10494
[ "$status" -eq 0 ]
10595

106-
wait_for_container 15 1 test_busybox
107-
10896
runc exec --env RUNC_EXEC_TEST=true test_busybox env
10997
[ "$status" -eq 0 ]
11098

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

122-
wait_for_container 15 1 test_busybox
123-
124110
runc exec --user 1000:1000 test_busybox id
125111
[ "$status" -eq 0 ]
126112

tests/integration/kill.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ function teardown() {
1818
[ "$status" -eq 0 ]
1919

2020
# check state
21-
wait_for_container 15 1 test_busybox
22-
2321
testcontainer test_busybox running
2422

2523
runc kill test_busybox KILL

tests/integration/list.bats

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ function teardown() {
2121
# run a few busyboxes detached
2222
ROOT=$HELLO_BUNDLE runc run -d --console-socket $CONSOLE_SOCKET test_box1
2323
[ "$status" -eq 0 ]
24-
wait_for_container_inroot 15 1 test_box1 $HELLO_BUNDLE
2524

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

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

3431
ROOT=$HELLO_BUNDLE runc list
3532
[ "$status" -eq 0 ]

tests/integration/mask.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ function teardown() {
2323
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
2424
[ "$status" -eq 0 ]
2525

26-
wait_for_container 15 1 test_busybox
27-
2826
runc exec test_busybox cat /testfile
2927
[ "$status" -eq 0 ]
3028
[[ "${output}" == "" ]]
@@ -43,8 +41,6 @@ function teardown() {
4341
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
4442
[ "$status" -eq 0 ]
4543

46-
wait_for_container 15 1 test_busybox
47-
4844
runc exec test_busybox ls /testdir
4945
[ "$status" -eq 0 ]
5046
[[ "${output}" == "" ]]

tests/integration/pause.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function teardown() {
1919
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
2020
[ "$status" -eq 0 ]
2121

22-
wait_for_container 15 1 test_busybox
22+
testcontainer test_busybox running
2323

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

47-
wait_for_container 15 1 test_busybox
47+
testcontainer test_busybox running
4848

4949
# pause test_busybox and nonexistent container
5050
runc pause test_busybox

tests/integration/ps.bats

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ function teardown() {
2020
[ "$status" -eq 0 ]
2121

2222
# check state
23-
wait_for_container 15 1 test_busybox
24-
2523
testcontainer test_busybox running
2624

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

4139
# check state
42-
wait_for_container 15 1 test_busybox
43-
4440
testcontainer test_busybox running
4541

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

5955
# check state
60-
wait_for_container 15 1 test_busybox
61-
6256
testcontainer test_busybox running
6357

6458
runc ps test_busybox -e -x

tests/integration/root.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ function teardown() {
2222
runc run -d --console-socket $CONSOLE_SOCKET test_busybox
2323
[ "$status" -eq 0 ]
2424

25-
# check state of the busyboxes are only in their respective root path
26-
wait_for_container 15 1 test_busybox
27-
wait_for_container_inroot 15 1 test_dotbox $HELLO_BUNDLE
28-
2925
runc state test_busybox
3026
[ "$status" -eq 0 ]
3127
[[ "${output}" == *"running"* ]]

0 commit comments

Comments
 (0)