]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-55-OOMD: Verify that ExecStopPost= runs on oom-kill
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 9 Sep 2025 11:27:06 +0000 (13:27 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 12 Sep 2025 23:20:56 +0000 (00:20 +0100)
test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service
test/units/TEST-55-OOMD.sh

index 70c87727c8b102d7592aab75d64b797c321d226e..abb16b47f9f9b71b4e603a45d56e43bbce08b794 100644 (file)
@@ -8,3 +8,4 @@ Description=Create a lot of memory pressure
 MemoryHigh=3M
 Slice=TEST-55-OOMD-workload.slice
 ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep
+ExecStopPost=-touch /run/testbloat-exec-stop-post
index 66793378584c6ff4ab8f10e9094dacb19347ed74..5eb3eb3f1a33f8028cc826199b2104533a34bfc9 100755 (executable)
@@ -133,6 +133,9 @@ test_basic() {
 
 testcase_basic_system() {
     test_basic /TEST.slice/TEST-55.slice/TEST-55-OOMD.slice/TEST-55-OOMD-workload.slice
+
+    # Ensure ExecStopPost= runs on oom-kill.
+    test -f /run/testbloat-exec-stop-post
 }
 
 testcase_basic_user() {