diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-09-23 07:39:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-09-23 07:43:16 +0100 |
commit | bca3ab2275283a3fc28f6129700d1c7b32e57312 (patch) | |
tree | e01cb1a6c8c9fb63eafbc2a530e4e9ebdf4aaedd /tests | |
parent | 8ad24eeacb56dbbe1948c41250d03cfcd7383ca8 (diff) |
igt/gem_concurrent_all: Leave bufmgr destroyed before forking
Otherwise we inherit the bufmgr and fd across the fork, try to clean it
up in the child (affecting the parent's device), then try to clean it up
in the parent (triggering warns).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_concurrent_all.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c index 1c920d6f..3cf5998f 100644 --- a/tests/gem_concurrent_all.c +++ b/tests/gem_concurrent_all.c @@ -820,16 +820,6 @@ static void buffers_create(struct buffers *b) static void buffers_reset(struct buffers *b, bool enable_reuse) { - buffers_destroy(b); - - igt_assert(b->count == 0); - igt_assert(b->tmp); - igt_assert(b->src); - igt_assert(b->dst); - - intel_batchbuffer_free(b->batch); - drm_intel_bufmgr_destroy(b->bufmgr); - b->bufmgr = drm_intel_bufmgr_gem_init(fd, 4096); igt_assert(b->bufmgr); @@ -1384,7 +1374,9 @@ static void __run_forked(struct buffers *buffers, { /* purge the libdrm caches before cloing the process */ - buffers_reset(buffers, true); + buffers_destroy(buffers); + intel_batchbuffer_free(buffers->batch); + drm_intel_bufmgr_destroy(buffers->bufmgr); igt_fork(child, num_children) { int num_buffers; @@ -1409,6 +1401,8 @@ static void __run_forked(struct buffers *buffers, } igt_waitchildren(); igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); + + buffers_reset(buffers, true); } static void run_forked(struct buffers *buffers, |