[PATCH] tests/intel/xe_vm: Fix assertion of batch buffer size
Kamil Konieczny
kamil.konieczny at linux.intel.com
Mon Jun 2 15:50:01 UTC 2025
Hi Shuicheng,
On 2025-05-30 at 00:18:44 +0000, Shuicheng Lin wrote:
> The batch buffer pointer is data not data[i]. Correct it in the assertion.
> Fix a word typo error.
>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Cc: Alex Zuo <alex.zuo at intel.com>
> Cc: Zongyao Bai <zongyao.bai at intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin at intel.com>
One more nit, please reply to CI failures with Cc given in it's mails:
I915-ci-infra at lists.freedesktop.org
You could look into few other series about how to do it,
for example series 'Update "force_reset" code'
(or check mailing list and search ones with reply from failure)
https://lore.kernel.org/igt-dev/870db824-04d1-4246-bcab-dfe2bbd023ee@intel.com/
https://lore.kernel.org/igt-dev/5fbb0f13-ee0b-4dff-a42d-c575375fc64e@intel.com/
Note also that reply cuts main text to keep only relevant part.
Regards,
Kamil
> ---
> tests/intel/xe_vm.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index b5bba7b7e..94cca13ba 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -1719,7 +1719,7 @@ test_munmap_style_unbind(int fd, struct drm_xe_engine_class_instance *eci,
> addr = base_addr;
>
> /*
> - * Kick a thread to write the first page continously to ensure we can't
> + * Kick a thread to write the first page continuously to ensure we can't
> * cause a fault if a rebind occurs during munmap style VM unbind
> * (partial VMAs unbound).
> */
> @@ -1750,7 +1750,7 @@ test_munmap_style_unbind(int fd, struct drm_xe_engine_class_instance *eci,
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> sync[0].flags &= ~DRM_XE_SYNC_FLAG_SIGNAL;
> if (i)
> @@ -1807,7 +1807,7 @@ try_again_after_invalidate:
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> sync[0].flags &= ~DRM_XE_SYNC_FLAG_SIGNAL;
> syncobj_reset(fd, &sync[1].handle, 1);
> @@ -1878,7 +1878,7 @@ try_again_after_invalidate:
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> sync[0].flags &= ~DRM_XE_SYNC_FLAG_SIGNAL;
> syncobj_reset(fd, &sync[1].handle, 1);
> @@ -2056,7 +2056,7 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> sync[0].flags &= ~DRM_XE_SYNC_FLAG_SIGNAL;
> if (i)
> @@ -2115,7 +2115,7 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> data = map1 + i * page_size;
> b = 0;
> @@ -2124,7 +2124,7 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
> data->batch[b++] = sdi_addr >> 32;
> data->batch[b++] = 0xc0ffee;
> data->batch[b++] = MI_BATCH_BUFFER_END;
> - igt_assert(b <= ARRAY_SIZE(data[i].batch));
> + igt_assert(b <= ARRAY_SIZE(data->batch));
>
> sync[0].flags &= ~DRM_XE_SYNC_FLAG_SIGNAL;
> if (i)
> --
> 2.25.1
>
More information about the igt-dev
mailing list