summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_reloc.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-05-01 15:13:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-05-01 15:15:08 +0100
commitf27fdfff026276ac75c69e487c929a843f66f6ca (patch)
tree7d6c5db5788a753459a2e1a2d834f6d0e3d649c1 /tests/i915/gem_exec_reloc.c
parent6b67961128e7b860946f92ca4162eae63e6a2df3 (diff)
i915/gem_exec_reloc: Catch the stop signal, even if not inside a syscall
Record receipt of the stop signal from our parent and STOP! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_exec_reloc.c')
-rw-r--r--tests/i915/gem_exec_reloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index fda71dd2..2a18c3b2 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -916,8 +916,10 @@ static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
return err;
}
+static int stop;
static void sighandler(int sig)
{
+ stop = 1;
}
static void parallel_child(int i915,
@@ -947,7 +949,7 @@ static void parallel_child(int i915,
unsigned long count = 0;
sigaction(SIGINT, &act, NULL);
- for (;;) {
+ while (!READ_ONCE(stop)) {
int err = __execbuf(i915, &execbuf);
if (err == -EINTR)
break;
@@ -977,6 +979,7 @@ static void parallel(int i915)
reloc = parallel_relocs(32 * 1024, &reloc_sz);
+ stop = 0;
__for_each_physical_engine(i915, e) {
igt_fork(child, 1)
parallel_child(i915, e, reloc, common);