summaryrefslogtreecommitdiff
path: root/tests/gem_mmap.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-17 23:06:59 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-17 23:06:59 +0200
commit1b1f4b16a25b6415187fd2b0906ae730e9ca8d23 (patch)
treed2c3748ced29834defdfc0d820484464e8967c3c /tests/gem_mmap.c
parent13b3e5f3e02a82e5d064e1f4f52eebb91c380819 (diff)
tests/gem_mmap: Add short mmap test
Blows up with the current full-object prefault code. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_mmap.c')
-rw-r--r--tests/gem_mmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c
index 46ef3ece..334bd760 100644
--- a/tests/gem_mmap.c
+++ b/tests/gem_mmap.c
@@ -92,6 +92,13 @@ igt_main
munmap(addr, OBJECT_SIZE);
}
+ igt_subtest("short-mmap") {
+ igt_assert(OBJECT_SIZE > 4096);
+ addr = gem_mmap__cpu(fd, handle, 4096, PROT_WRITE);
+ memset(addr, 0, 4096);
+ munmap(addr, 4096);
+ }
+
igt_fixture
close(fd);
}