diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-29 14:26:24 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-30 08:50:29 +0000 |
commit | 098a4013434dafda61fa47bde08c29b36f436e9b (patch) | |
tree | f14f9b7d00ffbd662cc6d16dfb00c025f8e51e46 /tests/prime_mmap_coherency.c | |
parent | 2649a091a0a67e6d4106024fb6d74cf7119f350f (diff) |
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=103649
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'tests/prime_mmap_coherency.c')
-rw-r--r-- | tests/prime_mmap_coherency.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/prime_mmap_coherency.c b/tests/prime_mmap_coherency.c index 192b4348..04b15ddd 100644 --- a/tests/prime_mmap_coherency.c +++ b/tests/prime_mmap_coherency.c @@ -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; } |