diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-10 12:28:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-10 16:01:05 +0100 |
commit | e8905e756cf3640c66541e963ff97f8af2d98936 (patch) | |
tree | 089eb1b7abaeb4f4a9e9a43e1a33c8b0cdc43188 /lib/igt_gt.c | |
parent | c3035d8cb11459f186f712d9c7ebb6734fc99831 (diff) |
lib: Require working GEM (!wedged) to allow hang injection
As we ordinarily use a spinning batch to trigger a hang, we cannot do so
without execbuf. On the other hand, if we do a manual reset of the
wedged driver, we expect it to remain wedged and for the reset to fail;
failing the test. Even if we remove the igt_assert(!wedged), the test is
suspect as we don't know if the reset took place and so do not know if
the conditions the test is trying to setup apply.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r-- | lib/igt_gt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 4569fd36..89b318ae 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -162,6 +162,13 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags) }; unsigned ban; + /* + * If the driver is already wedged, we don't expect it to be able + * to recover from reset and for it to remain wedged. It's hard to + * say even if we do hang/reset making the test suspect. + */ + igt_require_gem(fd); + igt_assert(igt_sysfs_set_parameter (fd, "reset", "%d", INT_MAX /* any reset method */)); |