From: Yu Watanabe Date: Fri, 11 Oct 2024 07:09:11 +0000 (+0900) Subject: TEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in config X-Git-Tag: v257-rc1~207^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1473836a1e3c528221439e3b0ce90e729b31adb3;p=thirdparty%2Fsystemd.git TEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in config Fedora and friends has a drop-in config for the settings in /usr/lib/systemd/user/slice.d/ . Hence, settings in the main .slice may be overridden. Let's set below in a drop-in with higher decimal prefix. Also, rename override.conf -> 99-managed-oom-preference.conf for the same reason. --- diff --git a/test/units/TEST-55-OOMD-workload.slice b/test/units/TEST-55-OOMD-workload.slice index d117b754baa..15580736044 100644 --- a/test/units/TEST-55-OOMD-workload.slice +++ b/test/units/TEST-55-OOMD-workload.slice @@ -7,5 +7,3 @@ CPUAccounting=true MemoryAccounting=true IOAccounting=true TasksAccounting=true -ManagedOOMMemoryPressure=kill -ManagedOOMMemoryPressureLimit=20% diff --git a/test/units/TEST-55-OOMD-workload.slice.d/99-oom.conf b/test/units/TEST-55-OOMD-workload.slice.d/99-oom.conf new file mode 100644 index 00000000000..1bed89c5eec --- /dev/null +++ b/test/units/TEST-55-OOMD-workload.slice.d/99-oom.conf @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Slice] +# Fedora and friends has a drop-in config for the settings in +# /usr/lib/systemd/user/slice.d/ . Hence, settings in the main .slice may be +# overridden. Let's set below in a drop-in with higher decimal prefix. +ManagedOOMMemoryPressure=kill +ManagedOOMMemoryPressureLimit=20% diff --git a/test/units/TEST-55-OOMD.sh b/test/units/TEST-55-OOMD.sh index 944067c5413..4a7c7f78aec 100755 --- a/test/units/TEST-55-OOMD.sh +++ b/test/units/TEST-55-OOMD.sh @@ -153,7 +153,7 @@ if cgroupfs_supports_user_xattrs; then sleep 120 # wait for systemd-oomd kill cool down and elevated memory pressure to come down mkdir -p /run/systemd/system/TEST-55-OOMD-testbloat.service.d/ - cat >/run/systemd/system/TEST-55-OOMD-testbloat.service.d/override.conf </run/systemd/system/TEST-55-OOMD-testbloat.service.d/99-managed-oom-preference.conf <