[PATCH i-g-t] tests/intel/xe_exec_mix_modes: Use IGT comparison functions
Francois Dugast
francois.dugast at intel.com
Mon Jan 27 10:14:25 UTC 2025
With igt_assert() the logs were only telling us that the comparison had
failed. With igt_assert_lt() the logs provide the actual values that
were compared, which helps debugging.
Signed-off-by: Francois Dugast <francois.dugast at intel.com>
---
tests/intel/xe_exec_mix_modes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_exec_mix_modes.c b/tests/intel/xe_exec_mix_modes.c
index 0bcd49cc0..59887d2aa 100644
--- a/tests/intel/xe_exec_mix_modes.c
+++ b/tests/intel/xe_exec_mix_modes.c
@@ -169,10 +169,10 @@ run_job(int fd, struct drm_xe_engine_class_instance *hwe,
* depending on the execution mode.
*/
if (engine_execution_mode == EXEC_MODE_LR)
- igt_assert(igt_nsec_elapsed(&tv) < 0.5 * duration_ns);
+ igt_assert_lt(igt_nsec_elapsed(&tv), 0.5 * duration_ns);
else if (engine_execution_mode == EXEC_MODE_DMA_FENCE &&
job_type == SPINNER_INTERRUPTED)
- igt_assert(igt_nsec_elapsed(&tv) > duration_ns);
+ igt_assert_lt(duration_ns, igt_nsec_elapsed(&tv));
}
}
--
2.43.0
More information about the igt-dev
mailing list