mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
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>
This commit is contained in:
+13
-13
@@ -220,22 +220,22 @@ igt_main
|
||||
major_evictions(fd, size, count);
|
||||
}
|
||||
|
||||
if (igt_fork_hang_helper()) {
|
||||
igt_subtest("minor-hang") {
|
||||
size = 1024 * 1024;
|
||||
count = 3*gem_aperture_size(fd) / size / 4;
|
||||
minor_evictions(fd, size, count);
|
||||
}
|
||||
igt_subtest("minor-hang") {
|
||||
igt_fork_hang_helper();
|
||||
size = 1024 * 1024;
|
||||
count = 3*gem_aperture_size(fd) / size / 4;
|
||||
minor_evictions(fd, size, count);
|
||||
}
|
||||
|
||||
igt_subtest("major-hang") {
|
||||
size = 3*gem_aperture_size(fd) / 4;
|
||||
count = 4;
|
||||
major_evictions(fd, size, count);
|
||||
}
|
||||
igt_stop_hang_helper();
|
||||
igt_subtest("major-hang") {
|
||||
size = 3*gem_aperture_size(fd) / 4;
|
||||
count = 4;
|
||||
major_evictions(fd, size, count);
|
||||
}
|
||||
igt_stop_signal_helper();
|
||||
|
||||
igt_fixture
|
||||
igt_fixture {
|
||||
igt_stop_hang_helper();
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
igt_subtest("swapping-hang")
|
||||
test_swapping_evictions(fd, size, count);
|
||||
|
||||
igt_subtest("minor-hang")
|
||||
test_minor_evictions(fd, size, count);
|
||||
|
||||
igt_subtest("major-hang") {
|
||||
size = 3*gem_aperture_size(fd) / 4;
|
||||
count = 4;
|
||||
test_major_evictions(fd, size, count);
|
||||
}
|
||||
|
||||
igt_stop_hang_helper();
|
||||
size = 1024 * 1024;
|
||||
count = 3*gem_aperture_size(fd) / size / 4;
|
||||
}
|
||||
igt_stop_signal_helper();
|
||||
|
||||
igt_subtest("mlocked-hang")
|
||||
test_mlocked_evictions(fd, size, count);
|
||||
|
||||
igt_subtest("swapping-hang")
|
||||
test_swapping_evictions(fd, size, count);
|
||||
|
||||
igt_subtest("minor-hang")
|
||||
test_minor_evictions(fd, size, count);
|
||||
|
||||
igt_subtest("major-hang") {
|
||||
size = 3*gem_aperture_size(fd) / 4;
|
||||
count = 4;
|
||||
test_major_evictions(fd, size, count);
|
||||
}
|
||||
|
||||
igt_stop_hang_helper();
|
||||
|
||||
igt_fixture {
|
||||
igt_stop_signal_helper();
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user