From 79ddf3c6f364d5c8b94aa11955c108628813d540 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 25 May 2026 11:28:36 +0100 Subject: [PATCH] Revert "test: switch TEST-55-OOMD stress-ng --vm-method to lfsr32" This reverts commit 4ac23697280bf54bb768f0aa7a5c7d7d0bcf3f6b. --- .../TEST-55-OOMD-testbloat.service | 7 ++++--- .../TEST-55-OOMD-testmunch.service | 7 ++++--- test/units/TEST-55-OOMD.sh | 15 +++++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service b/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service index e4109fd60d..22bbd210e9 100644 --- a/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service +++ b/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service @@ -7,6 +7,7 @@ Description=Create a lot of memory pressure # to throttle and be put under heavy pressure. MemoryHigh=3M Slice=TEST-55-OOMD-workload.slice -# Pin --vm-method=lfsr32: the only stress-ng vm method without TARGET_CLONES, -# so it can't dispatch to an AVX-512 clone and SIGILL on CPUs lacking it. -ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-method=lfsr32 +# Pin --vm-method to a portable method (zero-one): the default 'all' cycles +# through methods, including newer ones using AVX-512 instructions that SIGILL +# on CPUs without AVX-512 (e.g. AMD Zen 1-3), making the test flaky. +ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-method=zero-one diff --git a/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testmunch.service b/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testmunch.service index 81305c7e97..06eea10b79 100644 --- a/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testmunch.service +++ b/test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testmunch.service @@ -5,6 +5,7 @@ Description=Create some memory pressure [Service] MemoryHigh=12M Slice=TEST-55-OOMD-workload.slice -# Pin --vm-method=lfsr32: the only stress-ng vm method without TARGET_CLONES, -# so it can't dispatch to an AVX-512 clone and SIGILL on CPUs lacking it. -ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-method=lfsr32 +# Pin --vm-method to a portable method (zero-one): the default 'all' cycles +# through methods, including newer ones using AVX-512 instructions that SIGILL +# on CPUs without AVX-512 (e.g. AMD Zen 1-3), making the test flaky. +ExecStart=stress-ng --timeout 3m --vm 10 --vm-bytes 200M --vm-keep --vm-method=zero-one diff --git a/test/units/TEST-55-OOMD.sh b/test/units/TEST-55-OOMD.sh index 84baee12a4..b7311e83dc 100755 --- a/test/units/TEST-55-OOMD.sh +++ b/test/units/TEST-55-OOMD.sh @@ -366,12 +366,13 @@ EOF systemctl reload systemd-oomd.service # Run a transient service with OOMRules=testrule that generates memory pressure. - # Pin --vm-method=lfsr32: the only stress-ng vm method without TARGET_CLONES, - # so it can't dispatch to an AVX-512 clone and SIGILL on CPUs lacking it. + # Pin --vm-method to a portable method (zero-one): the default 'all' cycles + # through every method, including newer ones using AVX-512 instructions that + # SIGILL on CPUs without AVX-512 (e.g. AMD Zen 1-3), making the test flaky. (! systemd-run --wait --unit=TEST-55-OOMD-testrules \ -p MemoryHigh=3M \ -p OOMRules=testrule \ - stress-ng --timeout 3m --vm 10 --vm-bytes 50M --vm-keep --vm-method=lfsr32) + stress-ng --timeout 3m --vm 10 --vm-bytes 50M --vm-keep --vm-method=zero-one) # Verify in the journal that the rule triggered journalctl --sync @@ -456,12 +457,14 @@ EOF # Start the unit without --wait so we can check mid-run state. The # stress-ng timeout bounds the test if anything goes wrong. - # Pin --vm-method=lfsr32: the only stress-ng vm method without TARGET_CLONES, - # so it can't SIGILL on AVX-512-less CPUs and exit before the 6 s wait below. + # Pin --vm-method to a portable method (zero-one): the default 'all' cycles + # through every method, including newer ones using AVX-512 instructions that + # SIGILL on CPUs without AVX-512 (e.g. AMD Zen 1-3) and would cause stress-ng + # to exit before the 6 s wait below elapses, failing the ActiveState check. systemd-run --unit=TEST-55-OOMD-slowrule \ -p MemoryHigh=3M \ -p OOMRules=slowrule \ - stress-ng --timeout 15s --vm 10 --vm-bytes 50M --vm-keep --vm-method=lfsr32 + stress-ng --timeout 15s --vm 10 --vm-bytes 50M --vm-keep --vm-method=zero-one # Wait long enough for oomd's 1s rule-check loop to evaluate the condition # many times. With LastingSec=1h the kill must not fire.