]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/x86/xstate: Consolidate test invocations into a single entry
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 26 Feb 2025 01:07:27 +0000 (17:07 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Feb 2025 12:05:29 +0000 (13:05 +0100)
commit10d8a204c5009fb8a6cb2790d17b5611b795c349
tree8db23b377a531a930c89073acc8cab48f2a6115a
parente075d9fa16b3681b8a375cb47f4b5a1901e93530
selftests/x86/xstate: Consolidate test invocations into a single entry

Currently, each of the three xstate tests runs as a separate invocation,
requiring the xstate number to be passed and state information to be
reconstructed repeatedly. This approach arose from their individual and
isolated development, but now it makes sense to unify them.

Introduce a wrapper function that first verifies feature availability
from the kernel and constructs the necessary state information once. The
wrapper then sequentially invokes all tests to ensure consistent
execution.

Update the AMX test to use this unified invocation.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250226010731.2456-8-chang.seok.bae@intel.com
tools/testing/selftests/x86/amx.c
tools/testing/selftests/x86/xstate.c
tools/testing/selftests/x86/xstate.h