From 51aa13456993d38e7957946880f2695f48679c06 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 27 Nov 2018 13:11:46 +0000 Subject: lib: Show stacktrace when terminated by runner The igt_runner sends a SIGTERM to ask the test to cleanly exit upon an external timeout. It is useful to know what the code was doing when the timeout occurred, just in case it was unexpectedly stuck. However, since we use SIGTERM internally to marshal helper processes, we want to keep SIGTERM quiet, and so opt to use SIGQUIT for the timeout request instead. Signed-off-by: Chris Wilson Cc: Petri Latvala Reviewed-by: Petri Latvala --- runner/executor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runner') diff --git a/runner/executor.c b/runner/executor.c index a7d1f5f8..54c530b7 100644 --- a/runner/executor.c +++ b/runner/executor.c @@ -510,11 +510,11 @@ static int monitor_output(pid_t child, switch (killed) { case 0: if (settings->log_level >= LOG_LEVEL_NORMAL) { - printf("Timeout. Killing the current test with SIGTERM.\n"); + printf("Timeout. Killing the current test with SIGQUIT.\n"); fflush(stdout); } - killed = SIGTERM; + killed = SIGQUIT; if (!kill_child(killed, child)) return -1; @@ -526,7 +526,7 @@ static int monitor_output(pid_t child, watchdogs_set_timeout(120); intervals_left = timeout_intervals = 1; break; - case SIGTERM: + case SIGQUIT: if (settings->log_level >= LOG_LEVEL_NORMAL) { printf("Timeout. Killing the current test with SIGKILL.\n"); fflush(stdout); @@ -706,7 +706,7 @@ static int monitor_output(pid_t child, aborting = true; timeout = 2; - killed = SIGTERM; + killed = SIGQUIT; if (!kill_child(killed, child)) return -1; -- cgit v1.2.3