From fa612075690552d9841c901c0f271e1595aacfe8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 8 Aug 2018 11:18:28 +0100 Subject: igt/drv_missed_irq: Skip if the kernel reports no rings available to test Some setups (e.g. guc and gen10+) can not disable the MI_USER_INTERRUPT generation and so can not simulate missed interrupts. These tests would fail, so skip when the kernel reports no tests available. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- lib/igt_gt.c | 2 +- tests/i915/missed_irq.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index a2061924..dd28d821 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -535,7 +535,7 @@ unsigned intel_detect_and_clear_missed_interrupts(int fd) dir = igt_debugfs_dir(fd); missed = 0; - igt_assert(igt_sysfs_scanf(dir, "i915_ring_missed_irq", "%x", &missed) == 1); + igt_sysfs_scanf(dir, "i915_ring_missed_irq", "%x", &missed); if (missed) igt_sysfs_set(dir, "i915_ring_missed_irq", "0"); diff --git a/tests/i915/missed_irq.c b/tests/i915/missed_irq.c index 78690c36..cade3f37 100644 --- a/tests/i915/missed_irq.c +++ b/tests/i915/missed_irq.c @@ -113,6 +113,7 @@ igt_simple_main debugfs = igt_debugfs_dir(device); expect_rings = engine_mask(debugfs); + igt_require(expect_rings); igt_debug("Clearing rings %x\n", expect_rings); intel_detect_and_clear_missed_interrupts(device); -- cgit v1.2.3