Commit 8abe9198 authored by Chris Wilson's avatar Chris Wilson

igt/vgem_basic: Allow mmap() to persist without the vgem module loaded

Since vgem doesn't have any callbacks from shmemfs to its, we don't need
to keep the module around to service a pagefault when only using the
shmemfs facilities. Adjust the test to try to unload and check the mmap
for access.
Signed-off-by: Chris Wilson's avatarChris Wilson <>
parent d2adbdf8
......@@ -349,16 +349,14 @@ static void test_unload(void)
/* Although closed, the mmap should keep the dmabuf/module alive */
igt_assert_f(module_unload() != 0,
"A mmap should keep the module alive\n");
igt_assert_f(module_unload() == 0,
"A mmap should not keep the module alive\n");
for (int page = 0; page < bo.size >> 12; page++)
ptr[1024*page + page%1024] = page;
/* And finally we should have no more uses on the module. */
munmap(ptr, bo.size);
igt_assert_f(module_unload() == 0,
"No open mmap, should be able to unload\n");
static bool has_prime_export(int fd)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment