[PATCH i-g-t v3 4/6] tests/intel/xe_fault_injection: Inject errors during xe_guc_ct_send_recv & xe_guc_mmio_send_recv.
Lucas De Marchi
lucas.demarchi at intel.com
Thu Mar 13 04:05:02 UTC 2025
On Thu, Mar 06, 2025 at 03:40:39PM +0530, Satyanarayana K V P wrote:
>Use the kernel fault injection infrastructure to test error handling
>of xe during driver probe when executing xe_guc_ct_send_recv() /
>xe_guc_mmio_send_recv() so that more code paths are tested, such as
>error handling and unwinding.
>
>All xe_init() kind of functions are called just once during driver probe,
>so it is sufficient to fail first/all calls to them. Driver communicates
>with the GuC multiple times, and the real failure can happen at different
>call, hence the need to inject failure in GuC communication functions,
>like guc_mmio_send() or guc_ct_send(), but it can't be just first call or
>all calls, but we need to be able to select specific iteration to fail.
>
>To address this problem, the environmental variable IGT_FAULT_INJECT_ITERATION
>is used. If the IGT_FAULT_INJECT_ITERATION is not exported, an error will
>be injected in every possible function call starting from first up to the
>max number of iteration defined by INJECT_ITERATIONS, currently hardcoded
>as 100.
>
>Error can be injected using:
>igt at xe_fault_injection@probe-fail-guc-xe_guc_ct_send_recv
>igt at xe_fault_injection@probe-fail-guc-xe_guc_mmio_send_recv
>
>Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
>Cc: Michał Wajdeczko <michal.wajdeczko at intel.com>
>Cc: Francois Dugast <francois.dugast at intel.com>
this patch using the fail_function/space looks reasonable. I was in
doube if this would work for fail_function. Good to know it works.
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
thanks
Lucas De Marchi
More information about the igt-dev
mailing list