[igt-dev] [PATCH i-g-t 3/3] igt/drv_missed_irq: Skip if the kernel reports no rings available to test

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 16 09:35:09 UTC 2019


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 <chris at chris-wilson.co.uk>
---
 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 a20619246..dd28d821d 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 78690c36a..cade3f371 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);
-- 
2.20.1



More information about the igt-dev mailing list