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>
This commit is contained in:
Chris Wilson 2016-03-19 15:55:22 +00:00
parent f338e9834c
commit 82e9113bfb

View File

@ -237,7 +237,12 @@ bool igt_sigiter_continue(struct igt_sigiter *iter, bool enable)
if (iter->pass++ == 0) if (iter->pass++ == 0)
return igt_sigiter_start(iter, enable); 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); return igt_sigiter_stop(iter, enable);
igt_debug("%s: pass %d, missed %ld/%ld\n", igt_debug("%s: pass %d, missed %ld/%ld\n",