[igt-dev] [PATCH i-g-t] tests/i915/gem_mmap_wc: Tweak close subtest
Lukasz Kalamarz
lukasz.kalamarz at intel.com
Mon Jul 15 15:14:27 UTC 2019
Small change that allow user to lower OBJECT_SIZE without false negative.
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
Cc: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski at intel.com>
---
tests/i915/gem_mmap_wc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/i915/gem_mmap_wc.c b/tests/i915/gem_mmap_wc.c
index c9e5bf23..375a9b50 100644
--- a/tests/i915/gem_mmap_wc.c
+++ b/tests/i915/gem_mmap_wc.c
@@ -300,8 +300,8 @@ test_close(int fd)
memset(ptr, 0xcc, OBJECT_SIZE);
gem_close(fd, handle);
- for (i = 0; i < 4096; i++)
- igt_assert(ptr[i*4096+i] == 0xcc);
+ 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