From 10f903aa23932e8bce383ee56db8aaefd73dfb28 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 26 Apr 2015 11:21:10 +0100 Subject: [PATCH] igt/gem_pwrite: Check that mmap(wc) succeeds Signed-off-by: Chris Wilson --- tests/gem_pwrite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c index 4c223581..5b6a77fb 100644 --- a/tests/gem_pwrite.c +++ b/tests/gem_pwrite.c @@ -121,6 +121,8 @@ static void test_big_gtt(int fd, int scale) gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); ptr = gem_mmap__wc(fd, handle, 0, size, PROT_READ); + igt_assert(ptr); + for (offset = 0; offset < size; offset += 4096) { int suboffset = (offset >> 12) % (4096 / sizeof(offset) - 1) * sizeof(offset);