public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
Subject: [PATCH] ktest: Add logfile to failure directory
Date: Mon, 20 Apr 2026 14:23:25 -0400	[thread overview]
Message-ID: <20260420142315.7bbc3624@fedora> (raw)

From: Steven Rostedt <rostedt@goodmis.org>

The logfile contains a lot of useful information about the tests being
run. Add it to the stored failure directory when the test fails.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 tools/testing/ktest/ktest.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index dd55eea15070..f94ed2e98887 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1878,6 +1878,12 @@ sub save_logs {
 	"testlog" => $testlog,
     );
 
+    if (defined($opt{"LOG_FILE"})) {
+	if (-f $opt{"LOG_FILE"}) {
+	    cp $opt{"LOG_FILE"}, "$dir/logfile";
+	}
+    }
+
     while (my ($name, $source) = each(%files)) {
 	if (-f "$source") {
 	    cp "$source", "$dir/$name" or
-- 
2.51.0


                 reply	other threads:[~2026-04-20 18:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260420142315.7bbc3624@fedora \
    --to=rostedt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=warthog9@kernel.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