summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2021-12-17 13:19:53 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2021-12-17 17:27:58 +0100
commit415d7d774ab8bb46fae18dbb8aa4a69e0ad88b57 (patch)
tree0ee8854bd4569c5fb8796ec2a9b3a84cdea8aa7d
parentkernel-install: replace 00-entry-directory with K_I_LAYOUT in k-i (diff)
downloadsystemd-415d7d774ab8bb46fae18dbb8aa4a69e0ad88b57.tar.xz
systemd-415d7d774ab8bb46fae18dbb8aa4a69e0ad88b57.zip
test: adjust MemoryHigh= on oomd extended test units
On some runs `sleep infinity` run by the user manager uses over 3M of memory, which is higher than the MemoryHigh= set on testbloat and testmunch. If no pgscan is generated, then systemd-oomd sorts by memory usage which leads to a situation where testchill (using 3M) could be targeted over testbloat (1M-2M). Fix this by setting reasonable MemoryHigh= values for all of these test units. Even if somehow testchill throttles a bit at 3M, testbloat and testmunch should still be trying to use over 100M at memory and will throttle down to 5M and 6M with the new values. This should reflect the desired state in pgscan and memory usage during the test run. Fixes #21684
-rw-r--r--test/units/testsuite-55-testbloat.service2
-rw-r--r--test/units/testsuite-55-testchill.service1
-rw-r--r--test/units/testsuite-55-testmunch.service2
3 files changed, 3 insertions, 2 deletions
diff --git a/test/units/testsuite-55-testbloat.service b/test/units/testsuite-55-testbloat.service
index 675273ab47..8ec535979d 100644
--- a/test/units/testsuite-55-testbloat.service
+++ b/test/units/testsuite-55-testbloat.service
@@ -5,6 +5,6 @@ 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=1M
+MemoryHigh=5M
Slice=testsuite-55-workload.slice
ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-55-slowgrowth.sh
diff --git a/test/units/testsuite-55-testchill.service b/test/units/testsuite-55-testchill.service
index 49028e8ddc..369b8029d3 100644
--- a/test/units/testsuite-55-testchill.service
+++ b/test/units/testsuite-55-testchill.service
@@ -3,5 +3,6 @@
Description=No memory pressure
[Service]
+MemoryHigh=3M
Slice=testsuite-55-workload.slice
ExecStart=sleep infinity
diff --git a/test/units/testsuite-55-testmunch.service b/test/units/testsuite-55-testmunch.service
index 3b64931454..8820dc0678 100644
--- a/test/units/testsuite-55-testmunch.service
+++ b/test/units/testsuite-55-testmunch.service
@@ -3,6 +3,6 @@
Description=Create some memory pressure
[Service]
-MemoryHigh=2M
+MemoryHigh=6M
Slice=testsuite-55-workload.slice
ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-55-slowgrowth.sh