tools/testing/ktest/ktest.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Linus,
ktest updates for v7.1:
- Fix month in date timestamp used to create failure directories
On failure, a directory is created to store the logs and config file to
analyze the failure. The Perl function localtime is used to create the
data timestamp of the directory. The month passed back from that
function starts at 0 and not 1, but the timestamp used does not account
for that. Thus for April 20, 2026, the timestamp of 20260320 is used,
instead of 20260420.
- Save the logfile to the failure directory
Just the test log is saved to the directory on failure, but there's
useful information in the full logfile that can be helpful to analyzing
the failure. Save the logfile as well.
Please pull the latest ktest-v7.1-2 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git
ktest-v7.1-2
Tag SHA1: 283ba465c80c5d6c3d6e9dce8cd621be8652a2d5
Head SHA1: 932cdaf3e273a2727e77af97f79f12577174c5a0
Steven Rostedt (2):
ktest: Fix the month in the name of the failure directory
ktest: Add logfile to failure directory
----
tools/testing/ktest/ktest.pl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---------------------------
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 112f9ca2444b..f94ed2e98887 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1855,7 +1855,7 @@ sub save_logs {
my ($result, $basedir) = @_;
my @t = localtime;
my $date = sprintf "%04d%02d%02d%02d%02d%02d",
- 1900+$t[5],$t[4],$t[3],$t[2],$t[1],$t[0];
+ 1900+$t[5],$t[4]+1,$t[3],$t[2],$t[1],$t[0];
my $type = $build_type;
if ($type =~ /useconfig/) {
@@ -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
The pull request you sent on Wed, 22 Apr 2026 15:56:02 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git ktest-v7.1-2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/66a7974a395fe0ab8fb9f6acd013343bc6bad83a Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
© 2016 - 2026 Red Hat, Inc.