summaryrefslogtreecommitdiff
path: root/tests/gem_shrink.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-04-04 16:24:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-04-04 16:25:24 +0100
commit9cff3be12731bf73bee15a545bee50377f307f55 (patch)
tree5f0edbf181e43adc60728d3b06ccd88f88aefc71 /tests/gem_shrink.c
parent7a977554cb85c79b470312028712c4dad1626f84 (diff)
igt/gem_shrink: Reduce oom spam
Since we are deliberately going to fail the mmap() allocation, don't assert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_shrink.c')
-rw-r--r--tests/gem_shrink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gem_shrink.c b/tests/gem_shrink.c
index 136afa9078ce..44b6acbc5158 100644
--- a/tests/gem_shrink.c
+++ b/tests/gem_shrink.c
@@ -202,7 +202,8 @@ static void leak(int fd, uint64_t alloc)
ptr = mmap(NULL, alloc, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE | MAP_POPULATE,
-1, 0);
- igt_assert(ptr != (char *)-1);
+ if (ptr != (char *)-1)
+ return;
while (alloc) {
alloc -= 4096;