[PATCH i-g-t 2/2] tests/xe_eudebug_online: Adjust interrupt-other test
Dominik Karol Piątkowski
dominik.karol.piatkowski at intel.com
Thu Sep 26 12:18:46 UTC 2024
This test fails due to preemption interfering with it.
In order to fix it, set the preempt_timeout_us for engine_class used in
this test to maximum for the duration of the test.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
---
tests/intel/xe_eudebug_online.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 68d1b786f..d984eaf99 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -2212,6 +2212,8 @@ igt_main
struct drm_xe_engine_class_instance *hwe;
bool was_enabled;
int fd;
+ uint32_t preempt_timeout;
+ uint16_t engine_class = 0xFFFF;
igt_fixture {
fd = drm_open_driver(DRIVER_XE);
@@ -2247,8 +2249,17 @@ igt_main
test_gt_render_or_compute("interrupt-other-debuggable", fd, hwe)
test_interrupt_other(fd, hwe, SHADER_LOOP);
- test_gt_render_or_compute("interrupt-other", fd, hwe)
+ test_gt_render_or_compute("interrupt-other", fd, hwe) {
+ engine_class = hwe->engine_class;
+ igt_skip_on(!xe_eudebug_set_preempt_timeout_to_max(fd, engine_class,
+ &preempt_timeout));
test_interrupt_other(fd, hwe, SHADER_LOOP | DISABLE_DEBUG_MODE);
+ }
+
+ igt_fixture
+ if (engine_class != 0xFFFF &&
+ !xe_eudebug_restore_preempt_timeout(fd, engine_class, preempt_timeout))
+ igt_warn("Cleanup of preempt_timeout failed!\n");
test_gt_render_or_compute("interrupt-all-set-breakpoint", fd, hwe)
test_interrupt_all(fd, hwe, SHADER_LOOP | TRIGGER_RESUME_SET_BP);
--
2.34.1
More information about the igt-dev
mailing list