@@ -403,9 +403,6 @@ void igt_fork_hang_detector(int fd)
{
struct stat st;
- if (igt_only_list_subtests())
- return;
-
igt_assert(fstat(fd, &st) == 0);
signal(SIGRTMAX, sig_abort);
@@ -415,9 +412,6 @@ void igt_fork_hang_detector(int fd)
void igt_stop_hang_detector(void)
{
- if (igt_only_list_subtests())
- return;
-
igt_stop_helper(&hang_detector);
}
#else
@@ -1432,7 +1432,8 @@ run_mode(const char *prefix,
continue;
if (!*h->suffix)
- igt_fork_hang_detector(fd);
+ igt_fixture
+ igt_fork_hang_detector(fd);
for (p = all ? pipelines : pskip; p->prefix; p++) {
igt_fixture p->require();
@@ -1563,7 +1564,8 @@ run_mode(const char *prefix,
}
if (!*h->suffix)
- igt_stop_hang_detector();
+ igt_fixture
+ igt_stop_hang_detector();
}
igt_fixture
@@ -160,9 +160,9 @@ igt_main
}
} else
ppgtt_engines[ppgtt_nengine++] = 0;
- }
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
igt_subtest("basic") {
memset(&create, 0, sizeof(create));
@@ -193,8 +193,8 @@ igt_main
active(fd, e->exec_id | e->flags, 20, ncpus);
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -152,9 +152,9 @@ igt_main
fd = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd, 4096);
gem_write(fd, handle, 0, &bbe, sizeof(bbe));
- }
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (e = intel_execution_engines; e->name; e++) {
igt_subtest_f("%s%s", e->exec_id == 0 ? "basic-" : "", e->name)
@@ -167,9 +167,8 @@ igt_main
single(fd, handle, e, INTERRUPTIBLE, ncpus);
}
- igt_stop_hang_detector();
-
igt_fixture {
+ igt_stop_hang_detector();
gem_close(fd, handle);
close(fd);
}
@@ -266,10 +266,10 @@ igt_main
test_major_evictions(fd, size, count);
}
- igt_stop_hang_helper();
+ igt_stop_signal_helper();
igt_fixture {
- igt_stop_signal_helper();
+ igt_stop_hang_helper();
close(fd);
}
}
@@ -104,10 +104,11 @@ igt_main
const struct intel_execution_engine *e;
int fd = -1;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (e = intel_execution_engines; e->name; e++) {
igt_subtest_f("basic-%s", e->name)
@@ -118,8 +119,8 @@ igt_main
gtt(fd, e->exec_id | e->flags);
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -150,10 +150,11 @@ igt_main
const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
int device = -1;
- igt_fixture
+ igt_fixture {
device = drm_open_driver(DRIVER_INTEL);
- igt_fork_hang_detector(device);
+ igt_fork_hang_detector(device);
+ }
igt_subtest("basic")
all(device, 0, 20, 1);
@@ -163,8 +164,9 @@ igt_main
igt_subtest("madvise")
all(device, LEAK, 20, 1);
- igt_stop_hang_detector();
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(device);
+ }
}
@@ -519,9 +519,9 @@ igt_main
gem_require_mmap_wc(fd);
gen = intel_gen(intel_get_drm_devid(fd));
igt_info("Has LLC? %s\n", yesno(gem_has_llc(fd)));
- }
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (e = intel_execution_engines; e->name; e++) igt_subtest_group {
unsigned ring = e->exec_id | e->flags;
@@ -593,8 +593,8 @@ igt_main
}
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -196,10 +196,9 @@ igt_main
igt_fixture {
device = drm_open_driver(DRIVER_INTEL);
+ igt_fork_hang_detector(device);
}
- igt_fork_hang_detector(device);
-
igt_subtest("basic")
fillgtt(device, 0, 1); /* just enough to run a single pass */
@@ -210,9 +209,8 @@ igt_main
igt_subtest("all")
fillgtt(device, 0, 150);
- igt_stop_hang_detector();
-
igt_fixture {
+ igt_stop_hang_detector();
close(device);
}
}
@@ -208,9 +208,9 @@ igt_main
device = drm_open_driver(DRIVER_INTEL);
handle = gem_create(device, 4096);
gem_write(device, handle, 0, &bbe, sizeof(bbe));
- }
- igt_fork_hang_detector(device);
+ igt_fork_hang_detector(device);
+ }
igt_subtest("basic")
all(device, handle, 10);
@@ -222,9 +222,8 @@ igt_main
igt_subtest("all")
all(device, handle, 150);
- igt_stop_hang_detector();
-
igt_fixture {
+ igt_stop_hang_detector();
gem_close(device, handle);
close(device);
}
@@ -267,10 +267,11 @@ igt_main
};
int fd;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver_master(DRIVER_INTEL);
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (const struct mode *m = modes; m->name; m++)
igt_subtest_f("%s", *m->name ? m->name : "basic")
@@ -286,8 +287,8 @@ igt_main
all(fd, e->exec_id | e->flags, m->flags);
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -213,10 +213,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);
+ }
for (e = intel_execution_engines; e->name; e++)
igt_subtest_f("basic-%s", e->name)
@@ -225,8 +226,8 @@ igt_main
igt_subtest("basic-all")
store_all(fd);
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -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);
+ }
}
@@ -390,10 +390,11 @@ igt_main
};
int fd;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver_master(DRIVER_INTEL);
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (const struct mode *m = modes; m->name; m++)
igt_subtest_f("%s", m->name)
@@ -410,8 +411,8 @@ igt_main
}
}
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
@@ -209,10 +209,11 @@ igt_main
igt_skip_on_simulation();
- igt_fixture
+ igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
- igt_fork_hang_detector(fd);
+ igt_fork_hang_detector(fd);
+ }
for (e = intel_execution_engines; e->name; e++) {
igt_subtest_f("%s", e->name)
@@ -231,8 +232,8 @@ igt_main
igt_subtest("forked-all")
sync_all(fd, ncpus);
- igt_stop_hang_detector();
-
- igt_fixture
+ igt_fixture {
+ igt_stop_hang_detector();
close(fd);
+ }
}
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> --- lib/igt_aux.c | 6 ------ tests/gem_concurrent_all.c | 6 ++++-- tests/gem_ctx_create.c | 10 +++++----- tests/gem_ctx_switch.c | 7 +++---- tests/gem_evict_everything.c | 4 ++-- tests/gem_exec_basic.c | 11 ++++++----- tests/gem_exec_create.c | 10 ++++++---- tests/gem_exec_flush.c | 10 +++++----- tests/gem_exec_gttfill.c | 6 ++---- tests/gem_exec_nop.c | 7 +++---- tests/gem_exec_parallel.c | 11 ++++++----- tests/gem_exec_store.c | 11 ++++++----- tests/gem_exec_suspend.c | 11 ++++++----- tests/gem_exec_whisper.c | 11 ++++++----- tests/gem_sync.c | 11 ++++++----- 15 files changed, 66 insertions(+), 66 deletions(-)