From 4645630d3e7d1dcc8050e5f7da42318747002944 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 22 Jan 2016 19:29:07 +0000 Subject: [PATCH] igt/gem_concurrent_blit: Check inheritance of buffers The current forked modes recreate their handles in the children and just look at any complications arising from contention. This mode looks at inheriting the fd+handles from the parent into the child and seeing if we can use them within the child. Signed-off-by: Chris Wilson --- tests/gem_concurrent_all.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c index cc0e4565..9039ccb2 100644 --- a/tests/gem_concurrent_all.c +++ b/tests/gem_concurrent_all.c @@ -1129,6 +1129,19 @@ static void run_interruptible(struct buffers *buffers, igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); } +static void run_child(struct buffers *buffers, + do_test do_test_func, + do_copy do_copy_func, + do_hang do_hang_func) + +{ + igt_fork(child, 1) + do_test_func(buffers, do_copy_func, do_hang_func); + + igt_waitchildren(); + igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0); +} + static void __run_forked(struct buffers *buffers, int num_children, int loops, do_test do_test_func, @@ -1422,6 +1435,7 @@ run_modes(const char *style, const struct access_mode *mode, unsigned allow_mem) return; run_basic_modes(style, mode, "", run_single); + run_basic_modes(style, mode, "-child", run_child); run_basic_modes(style, mode, "-forked", run_forked); igt_fork_signal_helper();