[igt-dev] [PATCH i-g-t 2/2] tests/xe/exec_reset: Fix cm-gt-reset

Mishra, Pallavi pallavi.mishra at intel.com
Mon Dec 4 03:30:09 UTC 2023



> -----Original Message-----
> From: Welty, Brian <brian.welty at intel.com>
> Sent: Friday, December 1, 2023 1:00 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Mishra, Pallavi <pallavi.mishra at intel.com>
> Subject: [PATCH i-g-t 2/2] tests/xe/exec_reset: Fix cm-gt-reset
> 
> With use of GT_RESET and forcing GT reset, it is expected for the
> xe_wait_ufence to expire. Move the assertion checking into the IGT by using
> _xe_wait_ufence().
> 
> Signed-off-by: Brian Welty <brian.welty at intel.com>
> ---
>  tests/intel/xe_exec_reset.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c index
> 195e62911f..6fed0dd19e 100644
> --- a/tests/intel/xe_exec_reset.c
> +++ b/tests/intel/xe_exec_reset.c
> @@ -612,9 +612,14 @@ test_compute_mode(int fd, struct
> drm_xe_engine_class_instance *eci,
>  		return;
>  	}
> 
> -	for (i = 1; i < n_execs; i++)
> -		xe_wait_ufence(fd, &data[i].exec_sync, USER_FENCE_VALUE,
> -			       NULL, THREE_SEC);
> +	for (i = 1; i < n_execs; i++) {
> +		int64_t timeout = THREE_SEC;
> +		int err;
> +
> +		err = _xe_wait_ufence(fd, &data[i].exec_sync,
> USER_FENCE_VALUE,
> +				      NULL, &timeout);
> +		igt_assert_eq(err, flags & GT_RESET ? -ETIME : 0);
> +	}

Similar condition for GT_RESET will be required for igt_assert_eq(data[i].data, 0xc0ffee); 
> 
>  	sync[0].addr = to_user_pointer(&data[0].vm_sync);
>  	xe_vm_unbind_async(fd, vm, 0, 0, addr, bo_size, sync, 1);
> --
> 2.38.0



More information about the igt-dev mailing list