summaryrefslogtreecommitdiff
path: root/tests/gem_evict_everything.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-03 07:45:34 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-12-04 16:33:58 +0100
commitd8d1eab318f2f22c9199dcefc2b7b96ba4793cdc (patch)
tree3f5805ff5bb77a90d6a4b6632201d463126485a1 /tests/gem_evict_everything.c
parent39e44dfa4c0ba2f979dab5ea81074343de0ad2cb (diff)
lib: igt_fork_hang_helper must be run in fixtures
Because it opens an intel-specific drm fd. Fixes crashes when running igt on no-intel. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/gem_evict_everything.c')
-rw-r--r--tests/gem_evict_everything.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c
index ebf59f90..db6c333b 100644
--- a/tests/gem_evict_everything.c
+++ b/tests/gem_evict_everything.c
@@ -243,32 +243,32 @@ igt_main
test_major_evictions(fd, size, count);
}
- if (igt_fork_hang_helper()) {
- igt_fixture {
- size = 1024 * 1024;
- count = 3*gem_aperture_size(fd) / size / 4;
- }
+ igt_fixture {
+ igt_fork_hang_helper();
- igt_subtest("mlocked-hang")
- test_mlocked_evictions(fd, size, count);
+ size = 1024 * 1024;
+ count = 3*gem_aperture_size(fd) / size / 4;
+ }
- igt_subtest("swapping-hang")
- test_swapping_evictions(fd, size, count);
+ igt_subtest("mlocked-hang")
+ test_mlocked_evictions(fd, size, count);
- igt_subtest("minor-hang")
- test_minor_evictions(fd, size, count);
+ igt_subtest("swapping-hang")
+ test_swapping_evictions(fd, size, count);
- igt_subtest("major-hang") {
- size = 3*gem_aperture_size(fd) / 4;
- count = 4;
- test_major_evictions(fd, size, count);
- }
+ igt_subtest("minor-hang")
+ test_minor_evictions(fd, size, count);
- igt_stop_hang_helper();
+ igt_subtest("major-hang") {
+ size = 3*gem_aperture_size(fd) / 4;
+ count = 4;
+ test_major_evictions(fd, size, count);
}
- igt_stop_signal_helper();
+
+ igt_stop_hang_helper();
igt_fixture {
+ igt_stop_signal_helper();
close(fd);
}
}