]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: switch TEST-55-OOMD stress-ng --vm-method to lfsr32 42185/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 19 May 2026 21:42:25 +0000 (22:42 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 19 May 2026 21:53:59 +0000 (22:53 +0100)
commit4ac23697280bf54bb768f0aa7a5c7d7d0bcf3f6b
tree0c4e1b5efeb05109eb71545077741b473a912233
parentfc0bd373ef3bd1681f135451648297c6b3189019
test: switch TEST-55-OOMD stress-ng --vm-method to lfsr32

Commit 881e4717c7 ("test: pin stress-ng --vm-method to a portable
scalar method in TEST-55-OOMD") pinned --vm-method=zero-one with the
rationale that it is "a long-standing scalar method". That rationale is
wrong: stress_vm_zero_one() in stress-ng's stress-vm.c is declared

    static size_t TARGET_CLONES stress_vm_zero_one(...)

i.e. it carries the exact same TARGET_CLONES attribute as 33 of the 35
other vm methods. On x86_64 with GCC >=5, TARGET_CLONES expands (see
core-target-clones.h in stress-ng) to a target_clones attribute
including "arch=skylake-avx512", "arch=cooperlake", "arch=tigerlake",
"arch=sapphirerapids", and several other AVX-512-bearing arch variants,
plus "default". GCC generates AVX-512 clones of stress_vm_zero_one() and
the IFUNC resolver picks them on any CPU that advertises AVX-512.

The only vm methods in stress-ng's registry whose function definitions
omit TARGET_CLONES entirely (and are therefore guaranteed not to
dispatch to an AVX-512 clone) are lfsr32 (portable, always registered)
and write64ds (x86_64-only, gated on HAVE_ASM_X86_MOVDIRI, i.e. Intel
Tremont / Tiger Lake+ MOVDIRI instruction).

Switch the four stress-ng --vm invocations in TEST-55-OOMD to
--vm-method=lfsr32 so the AVX-512 SIGILL on CPUs without AVX-512 (e.g.
AMD Zen 1-3) can no longer occur regardless of compiler version,
optimization level, or stress-ng package build.

Follow-up for 881e4717c7981b274853309e68b39153e3b292f4

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testbloat.service
test/integration-tests/TEST-55-OOMD/TEST-55-OOMD.units/TEST-55-OOMD-testmunch.service
test/units/TEST-55-OOMD.sh