From: Yu Watanabe Date: Fri, 2 Jul 2021 17:23:11 +0000 (+0900) Subject: test: check memory pressure more frequently X-Git-Tag: v250-rc1~954^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa7ff467b638256e5cfb0d573c0e94766214615d;p=thirdparty%2Fsystemd.git test: check memory pressure more frequently --- diff --git a/test/units/testsuite-55.sh b/test/units/testsuite-55.sh index a6931a43617..39b01508ed2 100755 --- a/test/units/testsuite-55.sh +++ b/test/units/testsuite-55.sh @@ -21,7 +21,7 @@ fi rm -rf /etc/systemd/system/testsuite-55-testbloat.service.d -echo "DefaultMemoryPressureDurationSec=5s" >>/etc/systemd/oomd.conf +echo "DefaultMemoryPressureDurationSec=2s" >>/etc/systemd/oomd.conf mkdir -p /etc/systemd/system/systemd-oomd.service.d/ echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/systemd-oomd.service.d/debug.conf @@ -39,16 +39,16 @@ systemctl start testsuite-55-testbloat.service # Verify systemd-oomd is monitoring the expected units oomctl | grep "/testsuite-55-workload.slice" oomctl | grep "1.00%" -oomctl | grep "Default Memory Pressure Duration: 5s" +oomctl | grep "Default Memory Pressure Duration: 2s" -# systemd-oomd watches for elevated pressure for 5 seconds before acting. +# 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. timeout="$(date -ud "2 minutes" +%s)" while [[ $(date -u +%s) -le $timeout ]]; do if ! systemctl status testsuite-55-testbloat.service; then break fi - sleep 5 + sleep 2 done # testbloat should be killed and testchill should be fine