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

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuopp...@intel.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to