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

Lin, Shuicheng shuicheng.lin at intel.com
Thu Jun 12 10:39:51 UTC 2025


On Thurs, June 12, 2025 5:16 PM Kamil Konieczny wrote:
> 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.

Get it. Thanks.

Shuicheng
> 
> >
> > 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).

Sure. Please go ahead with v1. Thanks for the guide.

Shuicheng
> 
> 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).

Sure. Let me monitor the test results and reply to it with your shared examples.
As I have not done it before, if there is anything wrong, please let me know.
Thanks.

Shuicheng

> 
> 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