[PATCH i-g-t] tests/intel/xe_evict: Skip test if smem less than lmem

Matthew Brost matthew.brost at intel.com
Wed Mar 13 04:51:05 UTC 2024


On Wed, Mar 13, 2024 at 10:02:21AM +0530, priyanka.dandamudi at intel.com wrote:
> From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
> 
> Currently the tests are failing with OOO memory error.
> Test requires SRAM to be as big as VRAM. For example, small-cm creates
> (448 / 2) BOs with a size (1 / 128) of the total VRAM size. For
> simplicity ensure the SRAM size >= VRAM before running this test.
> Added code to skip the test if the system memory size is less than local
> memory size.
> 
> v2: Added memory size in the skip print.(kamil)
> Also added reason as a comment for the skip.(Matt)
> 
> Cc: Matthew Brost <matthew.brost at intel.com>
> Cc: Venkata Ramana Nayana <venkata.ramana.nayana at intel.com>
> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  tests/intel/xe_evict.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tests/intel/xe_evict.c b/tests/intel/xe_evict.c
> index 4de82c3bd..43e20ef6c 100644
> --- a/tests/intel/xe_evict.c
> +++ b/tests/intel/xe_evict.c
> @@ -754,6 +754,14 @@ igt_main
>  		vram_size = xe_visible_vram_size(fd, 0);
>  		igt_assert(vram_size);
>  
> +		/* Test requires SRAM to about as big as VRAM. For example, small-cm creates
> +		 * (448 / 2) BOs with a size (1 / 128) of the total VRAM size. For
> +		 * simplicity ensure the SRAM size >= VRAM before running this test.
> +		 */
> +		igt_skip_on_f(igt_get_avail_ram_mb() < (vram_size >> 20),
> +			      "System memory %lu MiB is less than local memory %lu MiB\n",
> +			      igt_get_avail_ram_mb(), vram_size >> 20);
> +
>  		xe_for_each_engine(fd, hwe)
>  			if (hwe->engine_class != DRM_XE_ENGINE_CLASS_COPY)
>  				break;
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list