[PATCH i-g-t] i915/gem_eio: Not everyone actually has contexts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eek, I assumed the 'banned' subtest only applied to context platforms,
ti 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@xxxxxxxxxxxxxxxxxx>
---
 tests/i915/gem_eio.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index c5fd07585..3f941071d 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -334,13 +334,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);
-
-			/* And check it actually works! */
-			execbuf.rsvd1 = ctx;
-			gem_execbuf(fd, &execbuf);
+			if (ctx) { /* remember the contextless! */
+				/* And check it actually works! */
+				execbuf.rsvd1 = ctx;
+				gem_execbuf(fd, &execbuf);
 
-			gem_context_destroy(fd, ctx);
+				gem_context_destroy(fd, ctx);
+			}
 			return;
 		}
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux