[igt-dev] [PATCH i-g-t] tests/i915/gem_shrink: Fix alloc_size unit

Matthew Auld matthew.auld at intel.com
Wed Nov 2 10:32:44 UTC 2022


On 02/11/2022 05:29, Niranjana Vishwanathapura wrote:
> alloc_size is in MBs, but functions are expecting bytes.
> Convert alloc_size to bytes before using it.
> 
> TODO: Needs some testing
> 
> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>

Most of this test is blacklisted for some reason. CI looks to only run 
the reclaim subtest.

Reviewed-by: Matthew Auld <matthew.auld at intel.com>

> ---
>   tests/i915/gem_shrink.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/i915/gem_shrink.c b/tests/i915/gem_shrink.c
> index 49df35c29..e3e20dfc9 100644
> --- a/tests/i915/gem_shrink.c
> +++ b/tests/i915/gem_shrink.c
> @@ -455,6 +455,7 @@ igt_main
>   		igt_info("Using %d processes and %'"PRIu64"MiB per process\n",
>   			 num_processes, alloc_size);
>   
> +		alloc_size <<= 20;
>   		igt_require_memory(num_processes, alloc_size,
>   				   CHECK_SWAP | CHECK_RAM);
>   


More information about the igt-dev mailing list