summaryrefslogtreecommitdiff
path: root/tests/gem_concurrent_all.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-22 19:29:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-22 19:40:30 +0000
commit4645630d3e7d1dcc8050e5f7da42318747002944 (patch)
tree2c9e2fb36acf3be1e88b4677fa78a7886225375f /tests/gem_concurrent_all.c
parent512f846f377ee97c90467ccd121519586263993f (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_concurrent_all.c')
-rw-r--r--tests/gem_concurrent_all.c14
1 files changed, 14 insertions, 0 deletions
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();