summaryrefslogtreecommitdiff
path: root/tests/gem_exec_suspend.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-17 16:04:09 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-17 16:04:09 +0200
commitbe21fc064b6d9ded5ccae7205204c0d5a03cf9e5 (patch)
treec2d69d5b4d1704a4a2439f6a3708df6a419dfbf1 /tests/gem_exec_suspend.c
parente63a0681d95a7288faff19a624548f96dbc73341 (diff)
tests: Push igt_fork/stop_hang_detector into fixtures
It access hardware, hence why the simple igt_only_list_subtests() check from igt_fork/stop_signal_helper() isn't enough. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/gem_exec_suspend.c')
-rw-r--r--tests/gem_exec_suspend.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/gem_exec_suspend.c b/tests/gem_exec_suspend.c
index cd133cc5..a45082ea 100644
--- a/tests/gem_exec_suspend.c
+++ b/tests/gem_exec_suspend.c
@@ -238,10 +238,11 @@ igt_main
const struct intel_execution_engine *e;
int fd;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver_master(DRIVER_INTEL);
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
igt_subtest("basic")
run_test(fd, -1, NOSLEEP);
@@ -261,8 +262,8 @@ igt_main
}
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}