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

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Wed Jan 15 05:09:22 UTC 2025


Acked. Will wait for next rev on this - but looks fine though.


On Wed, 2024-12-11 at 16:24 -0800, Daniele Ceraolo Spurio wrote:
> 
> 
> 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