[PATCH i-g-t 2/3] tests/intel/xe_gt_freq: Skip test if 'freq0' attribute is missing

Cavitt, Jonathan jonathan.cavitt at intel.com
Tue Jul 30 19:51:53 UTC 2024


-----Original Message-----
From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Marcin Bernatowicz
Sent: Tuesday, July 30, 2024 9:43 AM
To: igt-dev at lists.freedesktop.org
Cc: Tauro, Riana <riana.tauro at intel.com>; Vivi, Rodrigo <rodrigo.vivi at intel.com>; kamil.konieczny at linux.intel.com; Laguna, Lukasz <lukasz.laguna at intel.com>; Kolakowski, Jakub1 <jakub1.kolakowski at intel.com>
Subject: [PATCH i-g-t 2/3] tests/intel/xe_gt_freq: Skip test if 'freq0' attribute is missing
> 
> Add igt_require check for 'freq0' attribute to skip frequency tests
> on VF devices where this attribute is not present, preventing test
> failure.
> 
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>

LGTM.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  tests/intel/xe_gt_freq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
> index 93ebb5ed0..0a0efeff5 100644
> --- a/tests/intel/xe_gt_freq.c
> +++ b/tests/intel/xe_gt_freq.c
> @@ -414,6 +414,7 @@ igt_main
>  	igt_fixture {
>  		fd = drm_open_driver(DRIVER_XE);
>  
> +		igt_require(xe_sysfs_gt_has_attr(fd, 0, "freq0"));
>  		/* The defaults are the same. Stashing the gt0 is enough */
>  		stash_min = get_freq(fd, 0, "min");
>  		stash_max = get_freq(fd, 0, "max");
> -- 
> 2.31.1
> 
> 


More information about the igt-dev mailing list