@@ -46,6 +46,8 @@
static int device = -1;
static int sysfs = -1;
+IGT_TEST_DESCRIPTION("Tests for hang detection and recovery");
+
static bool has_error_state(int dir)
{
bool result;
@@ -315,9 +317,9 @@ static void hangcheck_unterminated(void)
gem_execbuf(device, &execbuf);
if (gem_wait(device, handle, &timeout_ns) != 0) {
- /* need to manually trigger an hang to clean before failing */
+ /* need to manually trigger a hang to clean before failing */
igt_force_gpu_reset(device);
- igt_assert_f(0, "unterminated batch did not trigger an hang!");
+ igt_assert_f(0, "unterminated batch did not trigger a hang!\n");
}
}
@@ -341,9 +343,11 @@ igt_main
igt_require(has_error_state(sysfs));
}
+ igt_describe("Basic error capture");
igt_subtest("error-state-basic")
test_error_state_basic();
+ igt_describe("Per engine error capture");
igt_subtest_with_dynamic("error-state-capture") {
for_each_ctx_engine(device, ctx, e) {
igt_dynamic_f("%s", e->name)
@@ -351,6 +355,7 @@ igt_main
}
}
+ igt_describe("Per engine hang recovery (spin)");
igt_subtest_with_dynamic("engine-hang") {
int has_gpu_reset = 0;
struct drm_i915_getparam gp = {
@@ -369,6 +374,7 @@ igt_main
}
}
+ igt_describe("Per engine hang recovery (invalid CS)");
igt_subtest_with_dynamic("engine-error") {
int has_gpu_reset = 0;
struct drm_i915_getparam gp = {
@@ -386,6 +392,7 @@ igt_main
}
}
+ igt_describe("Check that executing unintialised memory causes a hang");
igt_subtest("hangcheck-unterminated")
hangcheck_unterminated();