From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>
Subject: [igt-dev] [PATCH i-g-t] runner: Handle graceful exit regardless of log level
Date: Mon, 8 Feb 2021 12:24:39 +0200 [thread overview]
Message-ID: <20210208102439.29463-1-petri.latvala@intel.com> (raw)
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
next reply other threads:[~2021-02-08 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 10:24 Petri Latvala [this message]
2021-02-08 10:28 ` [igt-dev] [PATCH i-g-t] runner: Handle graceful exit regardless of log level 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208102439.29463-1-petri.latvala@intel.com \
--to=petri.latvala@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox