Message ID | 20190217143556.9482-2-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t,1/8] i915/gem_eio: Check that context create fails when wedged | expand |
On 17/02/19 06:35, Chris Wilson wrote: > In trigger the ban, we only want to observe the local context be banned > and not the fpriv as a whole. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Mika Kuoppala <mika.kuoppala@intel.com> > --- > tests/i915/gem_eio.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c > index 3c54820c9..3afdbd69e 100644 > --- a/tests/i915/gem_eio.c > +++ b/tests/i915/gem_eio.c > @@ -324,8 +324,15 @@ static void __test_banned(int fd) > igt_spin_t *hang; > > if (__gem_execbuf(fd, &execbuf) == -EIO) { > + uint32_t ctx = 0; > + > igt_info("Banned after causing %lu hangs\n", count); > igt_assert(count > 1); > + > + /* Only this context, not the file, should be banned */ > + igt_assert_neq(__gem_context_create(fd, &ctx), -EIO); Should we check submission works on the new context? Antonio > + igt_assert_neq(ctx, 0); > + gem_context_destroy(fd, ctx); > return; > } > >
Quoting Antonio Argenziano (2019-02-19 16:53:57) > > > On 17/02/19 06:35, Chris Wilson wrote: > > In trigger the ban, we only want to observe the local context be banned > > and not the fpriv as a whole. > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > Cc: Mika Kuoppala <mika.kuoppala@intel.com> > > --- > > tests/i915/gem_eio.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c > > index 3c54820c9..3afdbd69e 100644 > > --- a/tests/i915/gem_eio.c > > +++ b/tests/i915/gem_eio.c > > @@ -324,8 +324,15 @@ static void __test_banned(int fd) > > igt_spin_t *hang; > > > > if (__gem_execbuf(fd, &execbuf) == -EIO) { > > + uint32_t ctx = 0; > > + > > igt_info("Banned after causing %lu hangs\n", count); > > igt_assert(count > 1); > > + > > + /* Only this context, not the file, should be banned */ > > + igt_assert_neq(__gem_context_create(fd, &ctx), -EIO); > > Should we check submission works on the new context? Why not? In for a penny, in for a pound. -Chris
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index 3c54820c9..3afdbd69e 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -324,8 +324,15 @@ static void __test_banned(int fd) igt_spin_t *hang; if (__gem_execbuf(fd, &execbuf) == -EIO) { + uint32_t ctx = 0; + igt_info("Banned after causing %lu hangs\n", count); igt_assert(count > 1); + + /* Only this context, not the file, should be banned */ + igt_assert_neq(__gem_context_create(fd, &ctx), -EIO); + igt_assert_neq(ctx, 0); + gem_context_destroy(fd, ctx); return; }
In trigger the ban, we only want to observe the local context be banned and not the fpriv as a whole. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> --- tests/i915/gem_eio.c | 7 +++++++ 1 file changed, 7 insertions(+)