[PATCH] drm/xe/hw_engine_class_sysfs: Allow to inject error during probe

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 14 17:59:49 UTC 2025


On Fri, Mar 14, 2025 at 11:50:50AM +0100, Francois Dugast wrote:
>Allow fault injection in a function used during initialization by
>xe_hw_engine_class_sysfs_init() so that its error handling can be
>tested.
>
>Signed-off-by: Francois Dugast <francois.dugast at intel.com>
>---
> drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
>index b53e8d2accdb..e238c0e9fdd0 100644
>--- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
>+++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
>@@ -558,6 +558,7 @@ static int xe_add_hw_engine_class_defaults(struct xe_device *xe,
> 	kobject_put(kobj);
> 	return err;
> }
>+ALLOW_ERROR_INJECTION(xe_add_hw_engine_class_defaults, ERRNO); /* See xe_pci_probe() */


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>
> static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj)
> {
>-- 
>2.43.0
>


More information about the Intel-xe mailing list