If our CPU client is very slow to notice that the GPU spinner has started, we may consume the full heartbeat interval without noticing. This is bad if we are trying to test that a client that yield within the heartbeat interval is not selected for termination. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1879 Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- tests/i915/sysfs_heartbeat_interval.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/i915/sysfs_heartbeat_interval.c b/tests/i915/sysfs_heartbeat_interval.c index 6d4413d62..fe0cc046c 100644 --- a/tests/i915/sysfs_heartbeat_interval.c +++ b/tests/i915/sysfs_heartbeat_interval.c @@ -308,8 +308,13 @@ static void client(int i915, int engine, int *ctl, int duration, int expect) IGT_SPIN_POLL_RUN | IGT_SPIN_FENCE_OUT)); + /* XXX we need more precise means of limiting the spinner */ igt_spin_busywait_until_started(spin); - igt_assert_eq(sync_fence_status(spin->out_fence), 0); + if (sync_fence_status(spin->out_fence)) { + /* CPU too slow! */ + igt_spin_free(i915, spin); + continue; + } elapsed = measured_usleep(duration * 1000); igt_spin_end(spin); -- 2.26.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx