From bc44637c0c6d4c6ee42d1cf7538dd911623350ab Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Wed, 7 Oct 2020 17:21:12 +0200 Subject: stress: Run stress-ng cpu and memory tests using systemd-inhibit This runs stress-ng and inhibits system sleeping, shutdown and idle while doing so. Fixes lp:1815867 --- units/memory/jobs.pxu | 2 +- units/stress/jobs.pxu | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'units') diff --git a/units/memory/jobs.pxu b/units/memory/jobs.pxu index 565493a..3cb6b5b 100644 --- a/units/memory/jobs.pxu +++ b/units/memory/jobs.pxu @@ -47,7 +47,7 @@ user: root environ: STRESS_NG_MIN_SWAP_SIZE requires: executable.name == 'stress-ng' -command: stress_ng_test.py memory +command: systemd-inhibit stress_ng_test.py memory _summary: Stress test of system memory _description: Test to perform some basic stress and exercise of system memory via the diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu index aa12e28..2114b39 100644 --- a/units/stress/jobs.pxu +++ b/units/stress/jobs.pxu @@ -22,10 +22,10 @@ command: if [ -n "$STRESS_NG_CPU_TIME" ] then echo "Found STRESS_NG_CPU_TIME env var, stress_ng cpu running time is now: $STRESS_NG_CPU_TIME seconds" - stress_ng_test.py cpu --base-time "$STRESS_NG_CPU_TIME" + systemd-inhibit stress_ng_test.py cpu --base-time "$STRESS_NG_CPU_TIME" else echo STRESS_NG_CPU_TIME env var is not found, stress_ng cpu running time is default value - stress_ng_test.py cpu --base-time 7200 + systemd-inhibit stress_ng_test.py cpu --base-time 7200 fi _summary: Stress of CPUs (very long runtime) -- cgit v1.2.3