ci: move cgroup unmounting to run-ci-tests.sh

A previous commit added a cgroup cpuset unmounting to
scripts/ci/Makefile. We are sometimes running in a container without the
necessary privileges to unmount certain cgroups.

This commit moves the cgroup unmounting to a place in run-ci-tests.sh
which already requires privileged access and does not break unprivileged
build-only CI runs.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2022-11-07 08:26:10 +01:00 committed by Radostin Stoyanov
parent f47f5c0841
commit 979c84209b
2 changed files with 6 additions and 7 deletions

View file

@ -1,10 +1,4 @@
# Umount cpuset in cgroupv1 to make it move to cgroupv2
cpuset-cgroupv2:
if [ -d /sys/fs/cgroup/cpuset ]; then \
umount /sys/fs/cgroup/cpuset; \
fi
local: cpuset-cgroupv2
local:
./run-ci-tests.sh
.PHONY: local

View file

@ -144,6 +144,11 @@ time make unittest
[ -n "$SKIP_CI_TEST" ] && exit 0
# Umount cpuset in cgroupv1 to make it move to cgroupv2
if [ -d /sys/fs/cgroup/cpuset ]; then
umount /sys/fs/cgroup/cpuset
fi
ulimit -c unlimited
cgid=$$