Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] runner: Handle graceful exit regardless of log level
@ 2021-02-08 10:24 Petri Latvala
  2021-02-08 10:28 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Petri Latvala @ 2021-02-08 10:24 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala, Chris Wilson

The SIGHUP handling was incorrectly done only when log level was at
least 'normal'.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 runner/executor.c | 52 ++++++++++++++++++++++-------------------------
 1 file changed, 24 insertions(+), 28 deletions(-)

diff --git a/runner/executor.c b/runner/executor.c
index 3ca2d20a..9b582179 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -1008,37 +1008,33 @@ static int monitor_output(pid_t child,
 					     get_cmdline(siginfo.ssi_pid, comm, sizeof(comm)),
 					     siginfo.ssi_pid,
 					     strsignal(siginfo.ssi_signo));
+				}
 
-					if (siginfo.ssi_signo == SIGHUP) {
-						/*
-						 * If taken down with
-						 * SIGHUP, arrange the
-						 * current test to be
-						 * marked as notrun
-						 * instead of
-						 * incomplete. For
-						 * other signals we
-						 * don't need to do
-						 * anything, the lack
-						 * of a completion
-						 * marker of any kind
-						 * in the logs will
-						 * mark those tests as
-						 * incomplete. Note
-						 * that since we set
-						 * 'aborting' to true
-						 * we're going to skip
-						 * all other journal
-						 * writes later.
-						 */
+				if (siginfo.ssi_signo == SIGHUP) {
+					/*
+					 * If taken down with SIGHUP,
+					 * arrange the current test to
+					 * be marked as notrun instead
+					 * of incomplete. For other
+					 * signals we don't need to do
+					 * anything, the lack of a
+					 * completion marker of any
+					 * kind in the logs will mark
+					 * those tests as
+					 * incomplete. Note that since
+					 * we set 'aborting' to true
+					 * we're going to skip all
+					 * other journal writes later.
+					 */
 
+					if (settings->log_level >= LOG_LEVEL_NORMAL)
 						outf("Exiting gracefully, currently running test will have a 'notrun' result\n");
-						dprintf(outputs[_F_JOURNAL], "%s%d (%.3fs)\n",
-							EXECUTOR_EXIT,
-							-SIGHUP, 0.0);
-						if (settings->sync)
-							fdatasync(outputs[_F_JOURNAL]);
-					}
+
+					dprintf(outputs[_F_JOURNAL], "%s%d (%.3fs)\n",
+						EXECUTOR_EXIT,
+						-SIGHUP, 0.0);
+					if (settings->sync)
+						fdatasync(outputs[_F_JOURNAL]);
 				}
 
 				aborting = true;
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-08 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-08 10:24 [igt-dev] [PATCH i-g-t] runner: Handle graceful exit regardless of log level Petri Latvala
2021-02-08 10:28 ` Chris Wilson
2021-02-08 14:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-02-08 19:29 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox