[PATCH 0/4] lib/xe: Add fault injection helper functions

Jonathan Cavitt jonathan.cavitt at intel.com
Fri Aug 22 20:57:06 UTC 2025


Move several functions from the xe_fault_injection test suite to their
own helper function.  Specifically, the following functions were
migrated over:

- fail_function_injection_enabled
- ignore_dmesg_errors_from_dut
- injection_list_add
- injection_list_append
- injection_list_remove
- injection_list_clear
- setup_injection_fault
- get_remaining_injection_count
- set_retval

Several functions were renamed during the migration process to unify the
namespace.  Additionally, a new function, injection_exit_handler, was
added, which performs the same functionality that the function call
'igt_install_exit_handler(cleanup_injection_fault);' performed before.

The declaration for struct fault_injection_params was also moved over,
as well as a default param setup.

Moving the functions over this way affords us the opportunity to
investigate the xe_fault_injection tests to see if they should be
implemented in different test suites.  It also additionally affords us
the opportunity to decouple the xe_vm at bind-array-conflict-error-inject
test from CONFIG_DRM_XE_DEBUG.

Jonathan Cavitt (4):
  lib/xe: Add fault injection helper functions
  tests/intel/xe_vm: Use fault injection interface for error injection
    test
  tests/intel/xe_oa: Move oa fault tests from xe_fault_injection to
    xe_oa
  tests/intel/xe_vm: Move vm fault tests from xe_fault_injection to
    xe_vm

 lib/meson.build                  |   1 +
 lib/xe/xe_fault_injection.c      | 169 +++++++++++++
 lib/xe/xe_fault_injection.h      |  53 +++++
 tests/intel/xe_fault_injection.c | 392 +------------------------------
 tests/intel/xe_oa.c              |  71 ++++++
 tests/intel/xe_vm.c              | 153 +++++++++++-
 6 files changed, 452 insertions(+), 387 deletions(-)
 create mode 100644 lib/xe/xe_fault_injection.c
 create mode 100644 lib/xe/xe_fault_injection.h

-- 
2.43.0



More information about the igt-dev mailing list