]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ktest: Add logfile to failure directory
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 20 Apr 2026 18:23:25 +0000 (14:23 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 20 Apr 2026 19:23:13 +0000 (15:23 -0400)
The logfile contains a lot of useful information about the tests being
run. Add it to the stored failure directory when the test fails.

Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
Link: https://patch.msgid.link/20260420142315.7bbc3624@fedora
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl

index dd55eea15070c15de6dd5a50e6aacfd3d0bc5705..f94ed2e988873470d5235467d203a5a224a86626 100755 (executable)
@@ -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