summaryrefslogtreecommitdiff
path: root/tests/i915/gem_eio.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-17 14:18:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-19 17:44:53 +0000
commit8ce49ab09b5328c1e274f2c581592506c043fd45 (patch)
tree7a715d6e72a82b093b0bc8dd08151fceab1f8243 /tests/i915/gem_eio.c
parent368e76156f752e6ed6ac32ed9f400567aef7d3fc (diff)
i915/gem_eio: Check we only ban the context
In triggering 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 <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'tests/i915/gem_eio.c')
-rw-r--r--tests/i915/gem_eio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index ac85a2ef..b0be128e 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, &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);
+
+ /* And check it actually works! */
+ execbuf.rsvd1 = ctx;
+ gem_execbuf(fd, &execbuf);
+
+ gem_context_destroy(fd, ctx);
return;
}