]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-55-OOMD: check slice property before stressing slice
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Oct 2024 06:20:08 +0000 (15:20 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 13 Nov 2024 19:48:10 +0000 (19:48 +0000)
(cherry picked from commit a6092b532e1de0e1f9702f432c0c4c7de495bf4f)

test/units/TEST-55-OOMD.sh

index f36d6ff48d63b3d61fafc683db73996fe6a8ab81..92780165e24a906eaeac6f5750c6b1f458737a69 100755 (executable)
@@ -97,14 +97,15 @@ fi
 
 test_basic() {
     systemctl "$@" start TEST-55-OOMD-testchill.service
-    systemctl "$@" start TEST-55-OOMD-testbloat.service
+    systemctl "$@" status TEST-55-OOMD-testchill.service
+    systemctl "$@" status TEST-55-OOMD-workload.slice
 
     # Verify systemd-oomd is monitoring the expected units.
     timeout 1m bash -xec 'until oomctl | grep "/TEST-55-OOMD-workload.slice"; do sleep 1; done'
     oomctl | grep "/TEST-55-OOMD-workload.slice"
     oomctl | grep "20.00%"
 
-    systemctl "$@" status TEST-55-OOMD-testchill.service
+    systemctl "$@" start TEST-55-OOMD-testbloat.service
 
     # systemd-oomd watches for elevated pressure for 2 seconds before acting.
     # It can take time to build up pressure so either wait 2 minutes or for the service to fail.