[Intel-gfx] [PATCH i-g-t 2/2] i915/sysfs_heartbeat_interval: Check for support prior to 'nopreempt' test

Chris Wilson chris at chris-wilson.co.uk
Mon Mar 16 10:54:27 UTC 2020


To turn off preemption, we now require per-engine resets.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/sysfs_heartbeat_interval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/sysfs_heartbeat_interval.c b/tests/i915/sysfs_heartbeat_interval.c
index 0ba19b263..ef131a16c 100644
--- a/tests/i915/sysfs_heartbeat_interval.c
+++ b/tests/i915/sysfs_heartbeat_interval.c
@@ -227,7 +227,7 @@ static void test_nopreempt(int i915, int engine)
 	 */
 
 	/* Test heartbeats with forced preemption  disabled */
-	igt_sysfs_printf(engine, "preempt_timeout_ms", "%u", 0);
+	igt_require(igt_sysfs_printf(engine, "preempt_timeout_ms", "%u", 0) > 0);
 
 	igt_assert(igt_sysfs_scanf(engine, ATTR, "%u", &saved) == 1);
 	igt_debug("Initial %s:%u\n", ATTR, saved);
-- 
2.25.1



More information about the Intel-gfx mailing list