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

Jonathan Cavitt jonathan.cavitt at intel.com
Thu Aug 21 21:17:42 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
- 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 (2):
  lib/xe: Add fault injection helper functions
  tests/intel/xe_vm: Use fault injection interface for error injection
    test

 lib/meson.build                  |   1 +
 lib/xe/xe_fault_injection.c      | 157 +++++++++++++++++++++++++
 lib/xe/xe_fault_injection.h      |  51 ++++++++
 tests/intel/xe_fault_injection.c | 195 ++-----------------------------
 tests/intel/xe_vm.c              |  15 ++-
 5 files changed, 230 insertions(+), 189 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 Intel-gfx-trybot mailing list