[igt-dev] [i-g-t] tests/i915/gem_lmem_swapping: run only for discrete platform

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Nov 23 12:14:45 UTC 2021


On Tue, Nov 23, 2021 at 02:06:15PM +0530, Tejas Upadhyay wrote:
> Testsuit only meant to be run on discrete platforms and skip
> with right reason on other platforms.
> 
> Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay at intel.com>
> ---
>  tests/i915/gem_lmem_swapping.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
> index 3c1573b6..abf9d8a2 100644
> --- a/tests/i915/gem_lmem_swapping.c
> +++ b/tests/i915/gem_lmem_swapping.c
> @@ -525,6 +525,8 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>  		regions = gem_get_query_memory_regions(i915);
>  		igt_require(regions);
>  
> +		igt_require(gem_has_lmem(i915));
> +

Generally agree, this is better check. Only thing I would change
is the place of this require. I suggest immediate after require gem:

		i915 = drm_open_driver(DRIVER_INTEL);
		igt_require_gem(i915);
		igt_require(gem_has_lmem(i915));

With above changes:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew


>  		for_each_physical_engine(i915, e)
>  			__num_engines__++;
>  		igt_require(__num_engines__);
> -- 
> 2.31.1
> 


More information about the igt-dev mailing list