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>
This commit is contained in:
Chris Wilson 2016-04-04 16:24:47 +01:00
parent 7a977554cb
commit 9cff3be127

View File

@ -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;