[PATCH i-g-t] tests/intel/xe_exec_mix_modes: Use IGT comparison functions
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon Jan 27 12:56:03 UTC 2025
Hi Francois,
On 2025-01-27 at 11:14:25 +0100, Francois Dugast wrote:
> 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>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.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