[PATCH i-g-t 4/4] tests/intel/xe_fault_injection: Inject errors during xe_guc_ct_send_recv & xe_guc_mmio_send_recv.

Francois Dugast francois.dugast at intel.com
Tue Feb 18 16:40:03 UTC 2025


On Tue, Feb 18, 2025 at 03:06:27PM +0100, Michal Wajdeczko wrote:
> 
> 
> On 18.02.2025 14:48, Francois Dugast wrote:
> > On Fri, Feb 07, 2025 at 12:59:02PM +0530, Satyanarayana K V P wrote:
> 
> >> +
> >> +	/* Get the iteration count from environment */
> >> +	iter = get_fault_inject_iter();
> >> +	iter_start = iter ? : 0;
> >> +	iter_end = iter ? iter + 1 : INJECT_ITERATIONS;
> >> +	for (int i = iter_start; i < iter_end; i++) {
> >> +		fault_params->space = i;
> >> +		setup_injection_fault(fault_params);
> >> +		inject_fault_probe(fd, pci_slot, function_name);
> >> +	}
> > 
> > This loop is specific to the guc test, it is not present for other tests.
> > What is different about this test, why do we need to inject a fault at a
> > given iteration?
> > 
> > In case IGT_FAULT_INJECT_ITERATION is not set, why running
> > inject_fault_probe() 100 times instead of just once like with existing
> > tests during probe?
> > 
> 
> Because all xe_init() kind of functions are called just once during
> driver probe, so it is sufficient to fail first/all calls to them.
> 
> OTOH 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.
> 
> Only with that approach we can provide sufficient coverage of the driver
> probe related to GuC.
> 
> Michal

Makes sense, thanks for clarifying.

Francois


More information about the igt-dev mailing list