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

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Thu Nov 3 05:11:30 UTC 2022


alloc_size is in MBs, but functions are expecting bytes.
Convert alloc_size to bytes before using it.

Reviewed-by: Matthew Auld <matthew.auld at intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura 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);
 
-- 
2.21.0.rc0.32.g243a4c7e27



More information about the igt-dev mailing list