Skip to content

Commit

Permalink
runc kill: add kill -a test case
Browse files Browse the repository at this point in the history
Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Apr 27, 2023
1 parent 475c760 commit bbdd7f1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/integration/kill.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,19 @@ function teardown() {
runc delete test_busybox
[ "$status" -eq 0 ]
}

@test "kill --all KILL detached busybox" {
if [ $EUID -ne 0 ]; then
# kill --all requires working cgroups.
requires rootless_cgroup
# rootless containers have no cgroups configured by default.
set_cgroups_path
fi

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
}

0 comments on commit bbdd7f1

Please sign in to comment.