[PATCH i-g-t v1 5/7] tests/core_hotunplug: Open the same driver

Andrzej Hajda andrzej.hajda at intel.com
Wed Jun 12 07:07:23 UTC 2024



On 07.06.2024 17:36, Kamil Konieczny wrote:
> Make sure any later opens will use the same driver as the first
> one. Also while at this, print driver name before test starts.
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>

Regards
Andrzej
> ---
>   tests/core_hotunplug.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> index 7ed9abd37..ddf11bb00 100644
> --- a/tests/core_hotunplug.c
> +++ b/tests/core_hotunplug.c
> @@ -710,11 +710,16 @@ igt_main
>   
>   	igt_fixture {
>   		int fd_drm;
> +		char driver[32] = {};
>   
>   		fd_drm = __drm_open_driver(DRIVER_ANY);
>   		igt_skip_on_f(fd_drm < 0, "No known DRM device found\n");
>   
>   		priv.chipset = drm_get_chipset(fd_drm);
> +		/* Make sure it opens the same driver */
> +		__get_drm_device_name(fd_drm, driver, sizeof(driver) - 1);
> +		__set_forced_driver(driver);
> +		igt_info("DRM driver: %s\n", driver);
>   
>   		if (is_i915_device(fd_drm)) {
>   			gem_quiescent_gpu(fd_drm);



More information about the igt-dev mailing list