]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/x86/xstate: Refactor ptrace ABI test
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 26 Feb 2025 01:07:25 +0000 (17:07 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Feb 2025 12:05:29 +0000 (13:05 +0100)
commit7cb2fbe41949caa35ef1805323b8fc011fac2537
treed0a2d7aa351d58138a196291dfe4f3b4ea86cabb
parent40f6852ef2bffcd6fb3634cf71e6fbc2d1d6b768
selftests/x86/xstate: Refactor ptrace ABI test

Following the refactoring of the context switching test, the ptrace test is
another component reusable for other xstate features. As part of this
restructuring, add a missing check to validate the
user_xstateregs->xstate_fx_sw field in the ABI.

Also, replace err() and fatal_error() with ksft_exit_fail_msg() for
consistency in error handling.

  Expected output:
  $ amx_64
  ...
  [RUN]   AMX Tile data: inject xstate via ptrace().
  [OK]    'xfeatures' in SW reserved area was correctly written
  [OK]    xstate was correctly updated.

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-6-chang.seok.bae@intel.com
tools/testing/selftests/x86/amx.c
tools/testing/selftests/x86/xstate.c
tools/testing/selftests/x86/xstate.h