Skip to content

Commit 932cdaf

Browse files
committed
ktest: Add logfile to failure directory
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>
1 parent 768059e commit 932cdaf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tools/testing/ktest/ktest.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,12 @@ sub save_logs {
18781878
"testlog" => $testlog,
18791879
);
18801880

1881+
if (defined($opt{"LOG_FILE"})) {
1882+
if (-f $opt{"LOG_FILE"}) {
1883+
cp $opt{"LOG_FILE"}, "$dir/logfile";
1884+
}
1885+
}
1886+
18811887
while (my ($name, $source) = each(%files)) {
18821888
if (-f "$source") {
18831889
cp "$source", "$dir/$name" or

0 commit comments

Comments
 (0)