[PATCH v3] tests/intel/xe_exec_compute_mode: Fix assertion of batch buffer size

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jun 12 09:15:30 UTC 2025


Hi Shuicheng,
On 2025-06-12 at 08:14:30 +0000, Shuicheng Lin wrote:
> The batch buffer pointer is data[EXEC_DATA] not data. Correct it in the assertion.
> Fix 2 other issues reported by checkpatch.pl:
> "
> WARNING: please, no space before tabs
> FILE: tests/intel/xe_exec_compute_mode.c:27:
> 
> ERROR: code indent should use tabs where possible
> FILE: tests/intel/xe_exec_compute_mode.c:275:
> "

Please do not add checkpatch messages to commit,
rather just write for example: Fix whitespaces.

> 
> v2: fix issues reported by checkpatch.pl
> v3: add back the missed checkpatch message
> 
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
> ---
>  tests/intel/xe_exec_compute_mode.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/intel/xe_exec_compute_mode.c b/tests/intel/xe_exec_compute_mode.c
> index 8fba9daef..a7ea56327 100644
> --- a/tests/intel/xe_exec_compute_mode.c
> +++ b/tests/intel/xe_exec_compute_mode.c
> @@ -24,7 +24,7 @@
>  #include "xe/xe_spin.h"
>  #include <string.h>
>  
> -#define MAX_N_EXECQUEUES 	16
> +#define MAX_N_EXECQUEUES		16
>  #define USERPTR				(0x1 << 0)
>  #define REBIND				(0x1 << 1)
>  #define INVALIDATE			(0x1 << 2)
> @@ -272,7 +272,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
>  				map_fd = open("/tmp", O_TMPFILE | O_RDWR,
>  					      0x666);
>  				igt_assert_eq(write(map_fd, data, bo_size),
> -				              bo_size);
> +					      bo_size);

Both those whitespace fixes are far from a hunk with fix,
imho this should be in another patch, not mixed here.

>  				data = mmap((void *)MAP_ADDRESS, bo_size,
>  					    PROT_READ | PROT_WRITE, MAP_SHARED |
>  					    MAP_FIXED, map_fd, 0);
> @@ -393,7 +393,7 @@ static void non_block(int fd, int expect)
>  	data[EXEC_DATA].batch[b++] = sdi_addr >> 32;
>  	data[EXEC_DATA].batch[b++] = value;
>  	data[EXEC_DATA].batch[b++] = MI_BATCH_BUFFER_END;
> -	igt_assert(b <= ARRAY_SIZE(data->batch));
> +	igt_assert(b <= ARRAY_SIZE(data[EXEC_DATA].batch));

I will take v1 for a merge after all tests will run and after
you will reply to failures from CI (if any).

Please respond to tests results with cc to CI (e-mail is given
in failure report). Also cut reply after 'Known issues' as it
should be small (under few kilobytes).

Regards,
Kamil

>  
>  	sync[0].addr = addr + (char *)&data[EXEC_DATA].exec_sync - (char *)data;
>  	exec.num_syncs = 0;
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list