[igt-dev] [Intel-gfx] [RFC PATCH i-g-t v2 2/2] tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 25 15:45:50 UTC 2020


Quoting Janusz Krzysztofik (2020-02-25 15:41:28)
> Hi Chris,
> 
> On Fri, 2020-02-21 at 14:28 +0000, Chris Wilson wrote:
> > Quoting Janusz Krzysztofik (2020-02-21 11:17:01)
> > > +       /* create userptr object */
> > > +       igt_assert_eq(posix_memalign(&ptr, PAGE_SIZE, PAGE_SIZE),
> > > 0);
> > > +       gem_userptr(fd, ptr, PAGE_SIZE, 0, userptr_flags, &handle);
> > > +
> > > +       /* set up mmap-offset mapping on top of the object, skip if
> > > refused */
> > > +       map = __gem_mmap_offset(fd, handle, 0, PAGE_SIZE,
> > > +                               PROT_READ | PROT_WRITE, t->type);
> > > +       igt_skip_on_f(!map && errno == -ENODEV,
> 
> errno should be compared against a positive value, sorry for that bug.
> Thanks for fixing it and merging.

I was lazier than that. I feared we had scrubbed errno.
But the fixes were an improvement so had no reason to delay.
-Chris


More information about the igt-dev mailing list