1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-14 01:57:27 +03:00

test: test that delegation of some newer attrs that shall be delegated work

(cherry picked from commit 113defc76b3c85ee9041c0489883cd1eace7fe3c)
This commit is contained in:
Lennart Poettering 2023-12-13 10:10:56 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 9b298cb7e8
commit ed43523a79

View File

@ -26,6 +26,19 @@ systemd-run --wait \
-w /sys/fs/cgroup/system.slice/test-0.service/cgroup.procs -a \
-w /sys/fs/cgroup/system.slice/test-0.service/cgroup.subtree_control
# Test if this also works for some of the more recent attrs the kernel might or might not support
for attr in cgroup.threads memory.oom.group memory.reclaim ; do
if grep -q "$attr" /sys/kernel/cgroup/delegate ; then
systemd-run --wait \
--unit=test-0.service \
--property="DynamicUser=1" \
--property="Delegate=" \
test -w /sys/fs/cgroup/system.slice/test-0.service/ -a \
-w /sys/fs/cgroup/system.slice/test-0.service/"$attr"
fi
done
systemd-run --wait \
--unit=test-1.service \
--property="DynamicUser=1" \