Skip to content

Commit

Permalink
[debug] test case for issue opencontainers#4014
Browse files Browse the repository at this point in the history
For opencontainers#4014.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Sep 22, 2023
1 parent 1d9b158 commit 3bf5f9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/cgroups.bats
Expand Up @@ -199,6 +199,20 @@ function setup() {
check_cgroup_value "cpu.idle" "1"
}

# https://github.com/opencontainers/runc/issues/4014.
@test "runc run (pids.limit=0 means unlimited)" {
[ $EUID -ne 0 ] && requires rootless_cgroup

set_cgroups_path
update_config '.linux.resources.pids.limit |= 0'

runc run -d --console-socket "$CONSOLE_SOCKET" test_pids
[ "$status" -eq 0 ]
check_cgroup_value "pids.max" "max"
# systemd < v227 shows UINT64_MAX instead of "infinity".
check_systemd_value "TasksMax" "infinity" "18446744073709551615"
}

@test "runc run (cgroup v2 resources.unified only)" {
requires root cgroups_v2

Expand Down

0 comments on commit 3bf5f9c

Please sign in to comment.