[PATCH i-g-t 1/1] tests/intel/xe_fault_injection: Inject errors for xe_hw_engine_class_to_str
Dandamudi, Priyanka
priyanka.dandamudi at intel.com
Fri Apr 4 05:06:15 UTC 2025
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Sobin
> Thomas
> Sent: 04 April 2025 08:41 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Piatkowski, Dominik Karol <dominik.karol.piatkowski at intel.com>;
> Konieczny, Kamil <kamil.konieczny at intel.com>
> Subject: [PATCH i-g-t 1/1] tests/intel/xe_fault_injection: Inject errors for
> xe_hw_engine_class_to_str
>
> Use the fault injection infrastructure to make targeted fault injection in
> functions xe_hw_engine_class_to_str and check the error handling in the
> xe_hw_engine_class_sysfs_init() so that more code paths involving error
> handling is tested.
This is already handled in the kernel, that is the code path is covered, no need to add this here.
name = xe_hw_engine_class_to_str(hwe->class);
if (!name) {
err = -EINVAL;
goto err_object;
}
>
> Signed-off-by: Sobin Thomas <sobin.thomas at intel.com>
> ---
> tests/intel/xe_fault_injection.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
> index 24c114ba7..94c1bbf38 100644
> --- a/tests/intel/xe_fault_injection.c
> +++ b/tests/intel/xe_fault_injection.c
> @@ -173,6 +173,7 @@ static void set_retval(const char function_name[],
> long long retval)
> * @xe_guc_ct_init: xe_guc_ct_init
> * @xe_guc_log_init: xe_guc_log_init
> * @xe_guc_relay_init: xe_guc_relay_init
> + * @xe_hw_engine_class_to_str: xe_hw_engine_class_to_str
> * @xe_mmio_probe_early: xe_mmio_probe_early
> * @xe_pcode_probe_early: xe_pcode_probe_early
> * @xe_pm_init_early: xe_pm_init_early
> @@ -388,6 +389,7 @@ igt_main
> { "xe_guc_ct_init" },
> { "xe_guc_log_init" },
> { "xe_guc_relay_init" },
> + { "xe_hw_engine_class_to_str" },
> { "xe_mmio_probe_early" },
> { "xe_pcode_probe_early" },
> { "xe_pm_init_early" },
> --
> 2.34.1
More information about the igt-dev
mailing list