[PATCH i-g-t 2/7] tests/intel/xe_vm: Update invalid flag subtest

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Thu Dec 12 00:24:31 UTC 2024



On 12/11/2024 4:18 PM, Daniele Ceraolo Spurio wrote:
> PXP introduced a new valid flag, so we need to add it to the test and
> shift the first invalid bit left by one.
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> ---
>   tests/intel/xe_vm.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index e78ddd0e5..741dc0c7a 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -2216,6 +2216,11 @@ static void bind_flag_invalid(int fd)
>   	igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
>   	syncobj_reset(fd, &sync[0].handle, 1);
>   
> +	bind.bind.flags = DRM_XE_VM_BIND_FLAG_CHECK_PXP;
> +	igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
> +	igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
> +	syncobj_reset(fd, &sync[0].handle, 1);

Right after sending the patches I realized I forgot to squash a fix to 
only perform this ioctl if the PXP interface is supported. Will wait a 
bit for comments on other patches before re-spinning this one.

Daniele

> +
>   	bind.bind.flags = DRM_XE_VM_BIND_FLAG_NULL;
>   	bind.bind.obj = 0;
>   	igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
> @@ -2229,7 +2234,7 @@ static void bind_flag_invalid(int fd)
>   	syncobj_reset(fd, &sync[0].handle, 1);
>   
>   	/* Using invalid flags should not work */
> -	bind.bind.flags = 1 << 4;
> +	bind.bind.flags = 1 << 5;
>   	igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
>   	do_ioctl_err(fd, DRM_IOCTL_XE_VM_BIND, &bind, EINVAL);
>   



More information about the igt-dev mailing list