summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-03-19 15:55:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-03-19 16:00:02 +0000
commit82e9113bfbc342d3f839797471a7eab16ec40548 (patch)
tree396e17e1dc2b446e17ab4e92d18c3fe120281eb8 /lib/igt_aux.c
parentf338e9834ccf96f4eb66e33435866abfd1f55883 (diff)
lib/igt_aux: Refine decision to stop signal injection
The goal of injecting signals into the ioctl() is to trigger an EINTR. If we did not succeed on the last pass, we are not going to on the next or subsequent passes either. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 336440c9..da21f10f 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -237,7 +237,12 @@ bool igt_sigiter_continue(struct igt_sigiter *iter, bool enable)
if (iter->pass++ == 0)
return igt_sigiter_start(iter, enable);
- if (__igt_sigiter.stat.miss == __igt_sigiter.stat.ioctls)
+ /* If nothing reported SIGINT, nothing will on the next pass, so
+ * give up! Also give up if everything is now executing faster
+ * than current sigtimer.
+ */
+ if (__igt_sigiter.stat.hit == 0 ||
+ __igt_sigiter.stat.miss == __igt_sigiter.stat.ioctls)
return igt_sigiter_stop(iter, enable);
igt_debug("%s: pass %d, missed %ld/%ld\n",