[PATCH i-g-t v1 1/1] tests/xe_eudebug: check if driver is open before toggling enable

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Jan 15 10:39:11 UTC 2025


Hi Jan,
On 2025-01-10 at 12:52:01 +0000, Jan Sokolowski wrote:

please improve subject, it should have 'intel' there:

[PATCH i-g-t v1 1/1] tests/intel/xe_eudebug: check if driver is open

> In some cases, ccs_mode_all_engines can fail,
> which will cause test fixture to not execute properly
> and skip drm_open_driver, thus putting the test
> in an unstable state.
> 
> Check if driver is open or not and reopen if necessary.
> 
> Signed-off-by: Jan Sokolowski <jan.sokolowski at intel.com>
> ---
>  tests/intel/xe_eudebug.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
> index 22b0da658..6d06ed647 100644
> --- a/tests/intel/xe_eudebug.c
> +++ b/tests/intel/xe_eudebug.c
> @@ -2868,7 +2868,16 @@ igt_main
>  	}
>  
>  	igt_fixture {
> +		/* in previous subtest group, ccs_mode_all_engines can fail,
> +		 * which will cause test fixture to not execute properly
> +		 * and skip drm_open_driver, thus putting the test in an unstable state.
> +		 * Therefore, check if driver is open or not and reopen if necessary
> +		 */
> +		if (fcntl(fd, F_GETFD) < 0)
> +			fd = drm_open_driver(DRIVER_XE);

This looks strange, imho you should correct fixture and make
those opens for ccs in a test itself, not making corrections here.
imho also there should be a var to cleanup ccs mode after that
previous test so it will not affect other tests.

> +
>  		xe_eudebug_enable(fd, was_enabled);
> +

Please do not make unrelated code style changes in other places.

Regards,
Kamil

>  		drm_close_driver(fd);
>  	}
>  
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list