Skip to content

Commit 53a2b6a

Browse files
committed
runc kill: add kill -a test case
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent e42c219 commit 53a2b6a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/integration/kill.bats

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,19 @@ function teardown() {
2929
runc delete test_busybox
3030
[ "$status" -eq 0 ]
3131
}
32+
33+
@test "kill --all KILL detached busybox" {
34+
if [ $EUID -ne 0 ]; then
35+
# kill --all requires working cgroups.
36+
requires rootless_cgroup
37+
# rootless containers have no cgroups configured by default.
38+
set_cgroups_path
39+
fi
40+
41+
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
42+
[ "$status" -eq 0 ]
43+
44+
runc kill -a test_busybox KILL
45+
[ "$status" -eq 0 ]
46+
wait_for_container 10 1 test_busybox stopped
47+
}

0 commit comments

Comments
 (0)