[PATCH i-g-t 1/5] tests/gem_ctx_exec: Fail on unsuccessful preempt timeout update
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Mon Jul 15 18:13:42 UTC 2024
CI reports the following failures from basic-nohangcheck subtest:
(gem_ctx_exec:1115) CRITICAL: Test assertion failure function nohangcheck_hostile, file ../../../usr/src/igt-gpu-tools/tests/intel/gem_ctx_exec.c:374:
(gem_ctx_exec:1115) CRITICAL: Failed assertion: err == 0
(gem_ctx_exec:1115) CRITICAL: Last errno: 2, No such file or directory
(gem_ctx_exec:1115) CRITICAL: Hostile unpreemptable context was not cancelled immediately upon closure
The subtest sets 50 ms preempt timeout on each engine before proceding
with submission of spins, then it waits up to 1 second for those spins to
be terminated. However, dump of engines' debugfs data performed by the
subtest after the failure shows preempt timeouts still at their default
values: 7500 ms on rcs0 and 640 ms on other class engines. Dmesg records
confirm preemption timeouts triggered on other engines after 640 ms and
not on rcs0 within the 1 second limit.
As a first step, let the subtest verify return values of function calls
supposed to update the preempt timeouts with the new values. If failed
on any engine then report that as the actual failure instead continuing
the exercise and reporting a driver issue with context preemption.
Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6268
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
tests/intel/gem_ctx_exec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/intel/gem_ctx_exec.c b/tests/intel/gem_ctx_exec.c
index d6aa8ba0aa..9c2f749a4f 100644
--- a/tests/intel/gem_ctx_exec.c
+++ b/tests/intel/gem_ctx_exec.c
@@ -333,8 +333,9 @@ static void nohangcheck_hostile(int i915)
int new;
/* Set a fast hang detection for a dead context */
- gem_engine_property_printf(i915, e->name,
- "preempt_timeout_ms", "%d", 50);
+ igt_assert_lt(0, gem_engine_property_printf(i915, e->name,
+ "preempt_timeout_ms",
+ "%d", 50));
spin = __igt_spin_new(i915,
.ahnd = ahnd,
--
2.45.2
More information about the igt-dev
mailing list