From: Steven Rostedt Date: Mon, 20 Apr 2026 18:23:25 +0000 (-0400) Subject: ktest: Add logfile to failure directory X-Git-Tag: v7.1-rc1~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=932cdaf3e273a2727e77af97f79f12577174c5a0;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20260420142315.7bbc3624@fedora Signed-off-by: Steven Rostedt --- 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