[igt-dev] [PATCH] tests/xe/xe_query: Add subtest query-invalid-extension

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Apr 26 20:02:41 UTC 2023


On Wed, Apr 26, 2023 at 08:58:41PM +0200, Kumar, Janga Rahul wrote:

<cut>

> > 
> > We need to start fixing those tests as they are not properly validating uapi. See
> > gem_mmap_offset at bad-extensions.
> I think the best way here is to use the do_ioctl_err(..) wrapper. It will help in checking the expecting error as well.
> 
> -   igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
> +   do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);

Sure, we didn't use this broadly in i915 igt but looks good for me.

--
Zbigniew

> > 
> > --
> > Zbigniew
> > 
> > >  	igt_fixture {
> > >  		xe_device_put(xe);
> > >  		close(xe);
> > > --
> > > 2.25.1
> > >


More information about the igt-dev mailing list