1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

test: fix TEST-56-OOMD thresholds for linux 5.9 changes

Fixes #17533

The memory pressure values of the units in TEST-56-OOMD seemed to be a
lot lower after updating to linux 5.9. This is likely due to a fix from
e22c6ed90a.

To account for this, I lowered memory.high on testbloat.service to
throttle it even more. This was enough to generate the 50%+ value to trigger
oomd for the test, but as an extra precaution I also lowered the oomd
threshold to 1% so it's certain to try and kill testbloat.service.
This commit is contained in:
Anita Zhang 2020-12-02 14:41:38 -08:00
parent f01a3b79fa
commit 14d044da23
3 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@
Description=Create a lot of memory pressure
[Service]
# A very small memory.high will cause the script (trying to use a lot of memory)
# to throttle and be put under heavy pressure
MemoryHigh=2M
# A VERY small memory.high will cause the script (trying to use a lot of memory)
# to throttle and be put under heavy pressure.
MemoryHigh=1M
Slice=testsuite-56-workload.slice
ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-56-slowgrowth.sh

View File

@ -7,4 +7,4 @@ MemoryAccounting=true
IOAccounting=true
TasksAccounting=true
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimitPercent=50%
ManagedOOMMemoryPressureLimitPercent=1%

View File

@ -19,7 +19,7 @@ systemctl start testsuite-56-testchill.service
# Verify systemd-oomd is monitoring the expected units
oomctl | grep "/testsuite-56-workload.slice"
oomctl | grep "50%"
oomctl | grep "1%"
# systemd-oomd watches for elevated pressure for 30 seconds before acting.
# It can take time to build up pressure so either wait 5 minutes or for the service to fail.