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 +}