[PATCH v4 00/11] test: fix test failures on high core count systems

Stephen Hemminger
2026-03-05T17:53:32Z

Fix several test infrastructure issues affecting high core count systems.

Add rte_pause() to synchronization spinloops that starve SMT sibling
threads on AMD Zen systems. Scale iteration counts inversely with core
count via a new test_scale_iterations() helper to prevent timeouts
from lock contention (atomic, mcslock, stack, timer_secondary tests).

Replace volatile variables with C11 atomics in timer_secondary, fix
parallel test execution by restoring unique file-prefix for fast-tests
on Linux, and fix BPF ELF load test error handling and clang 20+
compatibility.

v4 - drop patches already covered elsewhere
- replace volatile with C11 atomics in timer secondary test
- add missing mempool_get error check in timer secondary test
- move iteration scaling out of worker function in stack test

Stephen Hemminger (11):
test: add pause to synchronization spinloops
test/atomic: scale test based on core count
test/mcslock: scale test based on number of cores
test/stack: scale test based on number of cores
test/timer: scale test based on number of cores
test/timer: replace volatile with C11 atomics
test: add file-prefix for all fast-tests on Linux
test: fix trace_autotest_with_traces parallel execution
test/bpf: fix error handling in ELF load tests
test/bpf: fix unsupported BPF instructions in ELF load test
test/bpf: pass correct size for Rx/Tx load tests

app/test/bpf/meson.build | 3 +-
app/test/suites/meson.build | 19 +++++++---
app/test/test.h | 19 ++++++++++
app/test/test_atomic.c | 66 +++++++++++++++++++--------------
app/test/test_bpf.c | 7 ++--
app/test/test_mcslock.c | 10 +++--
app/test/test_stack.c | 11 ++++--
app/test/test_threads.c | 17 +++++----
app/test/test_timer_secondary.c | 45 ++++++++++++++--------
9 files changed, 131 insertions(+), 66 deletions(-)

--
2.51.0