mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
test: Ensure delegation test unit has memory controller
When the test used to be run on distro that doesn't enable memory accounting by default (such as openSUSE TW), there is no guarantee that testing unit has memory.* cgroup attributes and delegation test would fail if they are missing. Require memory controller explicitly inside the unit so that test can work in any environment.
This commit is contained in:
@@ -32,6 +32,7 @@ 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="MemoryAccounting=1" \
|
||||
--property="DynamicUser=1" \
|
||||
--property="Delegate=" \
|
||||
test -w /sys/fs/cgroup/system.slice/test-0.service/ -a \
|
||||
|
||||
Reference in New Issue
Block a user