From e9cdc73d5cab14bfb2360121be359bb974c15654 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 11 Apr 2023 16:15:33 -0700 Subject: [PATCH] runc kill: add kill -a test case Signed-off-by: Kir Kolyshkin --- tests/integration/kill.bats | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/integration/kill.bats b/tests/integration/kill.bats index 590ddd5ef07..67b1cf6d9a6 100644 --- a/tests/integration/kill.bats +++ b/tests/integration/kill.bats @@ -29,3 +29,15 @@ function teardown() { runc delete test_busybox [ "$status" -eq 0 ] } + +@test "kill --all KILL detached busybox" { + # kill --all requires working cgroups. + [ $EUID -ne 0 ] && requires rootless_cgroup + + runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox + [ "$status" -eq 0 ] + + runc kill -a test_busybox KILL + [ "$status" -eq 0 ] + wait_for_container 10 1 test_busybox stopped +}