[Intel-gfx] [CI 2/5] igt/gem_workarounds: Also exercise fresh contexts not the persistent default

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 4 13:22:00 UTC 2017


Quoting Mika Kuoppala (2017-10-04 14:13:59)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> >  tests/gem_workarounds.c | 28 +++++++++++++++++++++++-----
> >  1 file changed, 23 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
> > index 95ec250a..c252133f 100644
> > --- a/tests/gem_workarounds.c
> > +++ b/tests/gem_workarounds.c
> > @@ -164,8 +164,14 @@ static int workaround_fail_count(int fd)
> >       return fail_count;
> >  }
> >  
> > -static void check_workarounds(int fd, enum operation op)
> > +#define CONTEXT 0x1
> > +static void check_workarounds(int fd, enum operation op, unsigned int flags)
> >  {
> > +     uint32_t ctx = 0;
> > +
> > +     if (flags & CONTEXT)
> > +             ctx = gem_context_create(fd);
> > +
> >       igt_assert_eq(workaround_fail_count(fd), 0);
> 
> The batch to read them will still use the default context. I would
> have assumed that you want to read the results throught your
> newly created context?

Yes, that was stupid!
-Chris


More information about the Intel-gfx mailing list