Commit 098a4013 authored by Chris Wilson's avatar Chris Wilson

igt/prime_mmap_coherency: Close dmabuf after use

As we loop over the coherency tests many times, we need to close the
dmabufs opened on every pass to prevent a fd leak and the test
exploding when it hits the process limit.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103649Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano's avatarAntonio Argenziano <antonio.argenziano@intel.com>
parent 2649a091
......@@ -101,6 +101,8 @@ static int test_read_flush(void)
drm_intel_bo_unreference(bo_1);
munmap(ptr_cpu, width * height);
close(dma_buf_fd);
return stale;
}
......@@ -169,6 +171,9 @@ static int test_write_flush(void)
drm_intel_bo_unreference(bo_2);
munmap(ptr_cpu, width * height);
close(dma_buf2_fd);
close(dma_buf_fd);
return stale;
}
......
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