diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-02-17 14:15:15 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-02-20 23:43:12 +0000 |
commit | 5aa3651ce2f5f562dad74f3e9d1ba47844e7a998 (patch) | |
tree | f8c7fa3344ebb12c34ce27e703b5a1df68e4e52b | |
parent | da2aa265bb266d427806cd04c748271a3e19f457 (diff) |
i915/gem_eio: Check that context create fails when wedged
Lock down the new uABI that DRM_IOCTL_I915_GEM_CONTEXT_CREATE returns
-EIO when wedged.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
-rw-r--r-- | tests/i915/gem_eio.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index b0be128e..75331ef2 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; @@ -819,6 +830,9 @@ igt_main igt_subtest("throttle") test_throttle(fd); + igt_subtest("context-create") + test_context_create(fd); + igt_subtest("execbuf") test_execbuf(fd); |