From: Yu Watanabe Date: Wed, 16 Oct 2024 06:18:41 +0000 (+0900) Subject: TEST-55-OOMD: stop test units when unnecessary X-Git-Tag: v257-rc1~207^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98a0bb8a6487a1bd0767223f3738525c2b3eae52;p=thirdparty%2Fsystemd.git TEST-55-OOMD: stop test units when unnecessary Then, sleep becomes not necessary anymore. This greatly improve performance. --- diff --git a/test/units/TEST-55-OOMD.sh b/test/units/TEST-55-OOMD.sh index ac496430746..84f4283fbfc 100755 --- a/test/units/TEST-55-OOMD.sh +++ b/test/units/TEST-55-OOMD.sh @@ -122,6 +122,11 @@ test_basic() { # testbloat should be killed and testchill should be fine if systemctl "$@" status TEST-55-OOMD-testbloat.service; then exit 42; fi if ! systemctl "$@" status TEST-55-OOMD-testchill.service; then exit 24; fi + + systemctl "$@" kill --signal=KILL TEST-55-OOMD-testbloat.service || : + systemctl "$@" stop TEST-55-OOMD-testbloat.service + systemctl "$@" stop TEST-55-OOMD-testchill.service + systemctl "$@" stop TEST-55-OOMD-workload.slice } testcase_basic_system() { @@ -145,8 +150,6 @@ testcase_preference_avoid() { return 0 fi - sleep 120 # wait for systemd-oomd kill cool down and elevated memory pressure to come down - mkdir -p /run/systemd/system/TEST-55-OOMD-testbloat.service.d/ cat >/run/systemd/system/TEST-55-OOMD-testbloat.service.d/99-managed-oom-preference.conf <