diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-01-06 21:37:21 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-01-09 17:56:57 +0000 |
commit | fd5e5a87fb2b5de6a25a00acd35dc23775b6b595 (patch) | |
tree | 7fe901a4b3b6596473e1eff795b9c5293c1e78e3 /test | |
parent | e683878c0f03a4ffa123e37b27933fbf7e144901 (diff) | |
download | systemd-fd5e5a87fb2b5de6a25a00acd35dc23775b6b595.tar.gz |
test: explicitly configure oomd stuff via dropins
so we don't get overridden by distro-shipped ones.
Fixes: #22030
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-55.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/units/testsuite-55.sh b/test/units/testsuite-55.sh index 379ea9e569..f0837d22a3 100755 --- a/test/units/testsuite-55.sh +++ b/test/units/testsuite-55.sh @@ -22,7 +22,13 @@ fi rm -rf /etc/systemd/system/testsuite-55-testbloat.service.d -echo "DefaultMemoryPressureDurationSec=2s" >>/etc/systemd/oomd.conf +# Configure oomd explicitly to avoid conflicts with distro dropins +mkdir -p /etc/systemd/oomd.conf.d/ +echo -e "[OOM]\nDefaultMemoryPressureDurationSec=2s" >/etc/systemd/oomd.conf.d/99-oomd-test.conf +mkdir -p /etc/systemd/system/-.slice.d/ +echo -e "[Slice]\nManagedOOMSwap=auto" >/etc/systemd/system/-.slice.d/99-oomd-test.conf +mkdir -p /etc/systemd/system/user@.service.d/ +echo -e "[Service]\nManagedOOMMemoryPressure=auto\nManagedOOMMemoryPressureLimit=0%" >/etc/systemd/system/user@.service.d/99-oomd-test.conf mkdir -p /etc/systemd/system/systemd-oomd.service.d/ echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/systemd-oomd.service.d/debug.conf |