Re: [Intel-gfx] [PATCH i-g-t] i915/gem_eio: Check we only ban the context
On 19/02/19 09:11, Chris Wilson wrote: In trigger the ban, we only want to observe the local context be banned and not the fpriv as a whole. v2: And send an execbuf down the new context. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Antonio Argenziano Reviewed-by: Antonio Argenziano --- tests/i915/gem_eio.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index ac85a2eff..b0be128ef 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -313,8 +313,20 @@ static void __test_banned(int fd) igt_spin_t *hang; if (__gem_execbuf(fd, ) == -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, ), -EIO); + igt_assert_neq(ctx, 0); + + /* And check it actually works! */ + execbuf.rsvd1 = ctx; + gem_execbuf(fd, ); + + gem_context_destroy(fd, ctx); return; } ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] i915/gem_eio: Check we only ban the context
In trigger the ban, we only want to observe the local context be banned and not the fpriv as a whole. v2: And send an execbuf down the new context. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Antonio Argenziano --- tests/i915/gem_eio.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index ac85a2eff..b0be128ef 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -313,8 +313,20 @@ static void __test_banned(int fd) igt_spin_t *hang; if (__gem_execbuf(fd, ) == -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, ), -EIO); + igt_assert_neq(ctx, 0); + + /* And check it actually works! */ + execbuf.rsvd1 = ctx; + gem_execbuf(fd, ); + + gem_context_destroy(fd, ctx); return; } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx