[igt-dev] [PATCH i-g-t] tests/i915/gem_mmap_wc: Adjust loop to OBJECT_SIZE

Katarzyna Dec katarzyna.dec at intel.com
Thu Feb 7 08:08:04 UTC 2019


When we run test with INTEL_SIMULATION=1 we set OBJECT_SIZE
to 1M which is not reflected in test_close() loop.

Signed-off-by: Katarzyna Dec <katarzyna.dec at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
---
 tests/i915/gem_mmap_wc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_mmap_wc.c b/tests/i915/gem_mmap_wc.c
index 110883eb..bff0fa2a 100644
--- a/tests/i915/gem_mmap_wc.c
+++ b/tests/i915/gem_mmap_wc.c
@@ -285,7 +285,7 @@ test_close(int fd)
 
 	memset(ptr, 0xcc, OBJECT_SIZE);
 	gem_close(fd, handle);
-	for (i = 0; i < 4096; i++)
+	for (i = 0; i < OBJECT_SIZE/4096; i++)
 		igt_assert(ptr[i*4096+i] == 0xcc);
 
 	munmap(ptr, OBJECT_SIZE);
-- 
2.20.1



More information about the igt-dev mailing list