mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests/int/cgroups: don't check for hugetlb
Systemd is not able to delegate hugetlb controller, and it is needed for cgroup v2 + systemd + rootless case (which is currently skipped because of "requires rootless_cgroup", but will be enabled by a later commit). The failure being fixed looks like this: > not ok 4 runc create (limits + cgrouppath + permission on the cgroup dir) succeeds > # (from function `check_cgroup_value' in file /vagrant/tests/integration/helpers.bash, line 188, > # in test file /vagrant/tests/integration/cgroups.bats, line 53) > # `check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/cgroup.controllers)"' failed > # <....> > # /sys/fs/cgroup/user.slice/user-2000.slice/user@2000.service/machine.slice/runc-cgroups-integration-test-20341.scope/cgroup.controllers > # current cpuset cpu io memory pids !? cpuset cpu io memory hugetlb pids Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -55,8 +55,8 @@ function setup() {
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/machine.slice/cgroup.controllers)"
|
||||
else
|
||||
# shellcheck disable=SC2046
|
||||
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/user.slice/user-$(id -u).slice/cgroup.controllers)"
|
||||
# Filter out hugetlb as systemd is unable to delegate it.
|
||||
check_cgroup_value "cgroup.controllers" "$(sed 's/ hugetlb//' </sys/fs/cgroup/user.slice/user-"$(id -u)".slice/cgroup.controllers)"
|
||||
fi
|
||||
else
|
||||
check_cgroup_value "cgroup.controllers" "$(cat /sys/fs/cgroup/cgroup.controllers)"
|
||||
|
||||
Reference in New Issue
Block a user