summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-21 09:59:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-21 20:44:13 +0000
commit2b7dd10a4e2ea0cabff68421fd15e96c99be3cad (patch)
tree134c7960b8ab0bf6fe536195952827fdec0a3d74 /tests
parent8ca0b308acdcf53fac3cf2ea3861f5f911b16986 (diff)
i915/gem_eio: Not everyone actually has contexts!
Eek, I assumed the 'banned' subtest only applied to context platforms, it doesn't. The basic test works for all, checking whether a second context works after the first is banned however only applies to platforms with contexts! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/i915/gem_eio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 75331ef2..21bf6428 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -331,13 +331,13 @@ static void __test_banned(int fd)
/* Only this context, not the file, should be banned */
igt_assert_neq(__gem_context_create(fd, &ctx), -EIO);
- igt_assert_neq(ctx, 0);
+ if (ctx) { /* remember the contextless! */
+ /* And check it actually works! */
+ execbuf.rsvd1 = ctx;
+ gem_execbuf(fd, &execbuf);
- /* And check it actually works! */
- execbuf.rsvd1 = ctx;
- gem_execbuf(fd, &execbuf);
-
- gem_context_destroy(fd, ctx);
+ gem_context_destroy(fd, ctx);
+ }
return;
}