[igt-dev] [PATCH v16 5/8] tests: gem_exec_basic: add engine discovery test

Chris Wilson chris at chris-wilson.co.uk
Sun Mar 31 17:42:09 UTC 2019


Quoting Andi Shyti (2019-03-31 18:36:59)
> > > +       igt_subtest("exec-engines-ctx") {
> > > +               uint64_t ctx_id;
> > > +               struct intel_execution_engine2 *e2;
> > > +
> > > +               ctx_id = gem_context_create(fd);
> > > +
> > > +               for_each_context_engine(fd, ctx_id, e2)
> > > +                       igt_assert(gem_context_has_engine(fd, ctx_id,
> > > +                                                         e2->flags));
> > > +
> > > +               gem_context_destroy(fd, ctx_id);
> > > +       }
> > 
> > Starting subtest: exec-engines-ctx
> > (gem_exec_basic:17617) CRITICAL: Test assertion failure function __real_main117, file ../tests/i915/gem_exec_basic.c:146:
> > (gem_exec_basic:17617) CRITICAL: Failed assertion: gem_context_has_engine(fd, ctx_id, e2->flags)
> > Stack trace:
> >   #0 ../lib/igt_core.c:1474 __igt_fail_assert()
> >   #1 ../tests/i915/gem_exec_basic.c:144 __real_main117()
> >   #2 ../tests/i915/gem_exec_basic.c:117 main()
> >   #3 ../csu/libc-start.c:342 __libc_start_main()
> >   #4 [_start+0x2a]
> > Subtest exec-engines-ctx failed.
> > **** DEBUG ****
> > (gem_exec_basic:17617) CRITICAL: Test assertion failure function __real_main117, file ../tests/i915/gem_exec_basic.c:146:
> > (gem_exec_basic:17617) CRITICAL: Failed assertion: gem_context_has_engine(fd, ctx_id, e2->flags)
> > (gem_exec_basic:17617) igt_core-INFO: Stack trace:
> > (gem_exec_basic:17617) igt_core-INFO:   #0 ../lib/igt_core.c:1474 __igt_fail_assert()
> > (gem_exec_basic:17617) igt_core-INFO:   #1 ../tests/i915/gem_exec_basic.c:144 __real_main117()
> > (gem_exec_basic:17617) igt_core-INFO:   #2 ../tests/i915/gem_exec_basic.c:117 main()
> > (gem_exec_basic:17617) igt_core-INFO:   #3 ../csu/libc-start.c:342 __libc_start_main()
> > (gem_exec_basic:17617) igt_core-INFO:   #4 [_start+0x2a]
> > ****  END  ****
> > 
> > I'd say that is worth a little polishing on what the error might have
> > been.
> 
> mmmhhh... how did you get it? I tested it on drm-tip kernel
> (different versions), mainline kernel (different versions) and
> Tvrtko's kernel and didn't get any failure.

I'm testing on the patches posted for upstream. The point is not that it
failed, but that the failure message doesn't give a clue: e2->flags and
e2->name would definitely be helpful. igt_debug of the query results may
help, but be judicious and avoid spammy debug.
-Chris


More information about the igt-dev mailing list