[PATCH i-g-t 06/10] tests/intel/xe_fault_injection: Use igt_kmod_bind()
Francois Dugast
francois.dugast at intel.com
Mon Apr 14 11:00:57 UTC 2025
On Thu, Apr 10, 2025 at 03:48:35PM -0700, Lucas De Marchi wrote:
> The following sequence is very odd:
>
> drm_close_driver(fd);
> xe_sysfs_driver_do(fd, pci_slot, XE_SYSFS_DRIVER_BIND);
>
> When the second call is done, fd is invalid. It's not a bug since
> xe_sysfs_driver_do() does nothing with that other than returning.
> However, now that we have igt_kmod_bind(), use it.
>
> While at it, remove some trailing newlines.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Francois Dugast <francois.dugast at intel.com>
> ---
> tests/intel/xe_fault_injection.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
> index fdd11ffe6..61d5fa872 100644
> --- a/tests/intel/xe_fault_injection.c
> +++ b/tests/intel/xe_fault_injection.c
> @@ -481,8 +481,6 @@ igt_main
> igt_fixture {
> close(sysfs);
> drm_close_driver(fd);
> - xe_sysfs_driver_do(fd, pci_slot, XE_SYSFS_DRIVER_BIND);
> + igt_kmod_bind("xe", pci_slot);
> }
> -
> -
> }
>
> --
> 2.49.0
>
More information about the igt-dev
mailing list