[PATCH i-g-t 1/8] i915/gem_eio: Check that context create fails when wedged

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

 



Lock down the new uABI that DRM_IOCTL_I915_GEM_CONTEXT_CREATE returns
-EIO when wedged.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
---
 tests/i915/gem_eio.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index ac85a2eff..3c54820c9 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -118,6 +118,17 @@ static void test_throttle(int fd)
 	trigger_reset(fd);
 }
 
+static void test_context_create(int fd)
+{
+	uint32_t ctx;
+
+	wedge_gpu(fd);
+
+	igt_assert_eq(__gem_context_create(fd, &ctx), -EIO);
+
+	trigger_reset(fd);
+}
+
 static void test_execbuf(int fd)
 {
 	struct drm_i915_gem_execbuffer2 execbuf;
@@ -807,6 +818,9 @@ igt_main
 	igt_subtest("throttle")
 		test_throttle(fd);
 
+	igt_subtest("context-create")
+		test_context_create(fd);
+
 	igt_subtest("execbuf")
 		test_execbuf(fd);
 
-- 
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