Skip to content

Commit 98f4ba3

Browse files
rostedtgregkh
authored andcommitted
ktest: Fix the month in the name of the failure directory
commit 768059e upstream. The Perl localtime() function returns the month starting at 0 not 1. This caused the date produced to create the directory for saving files of a failed run to have the month off by one. machine-test-useconfig-fail-20260314073628 The above happened in April, not March. The correct name should have been: machine-test-useconfig-fail-20260414073628 This was somewhat confusing. Cc: stable@vger.kernel.org Cc: John 'Warthog9' Hawley <warthog9@kernel.org> Link: https://patch.msgid.link/20260420142426.33ad0293@fedora Fixes: 7faafbd ("ktest: Add open and close console and start stop monitor") Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9d8fd84 commit 98f4ba3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/ktest/ktest.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ sub save_logs {
17771777
my ($result, $basedir) = @_;
17781778
my @t = localtime;
17791779
my $date = sprintf "%04d%02d%02d%02d%02d%02d",
1780-
1900+$t[5],$t[4],$t[3],$t[2],$t[1],$t[0];
1780+
1900+$t[5],$t[4]+1,$t[3],$t[2],$t[1],$t[0];
17811781

17821782
my $type = $build_type;
17831783
if ($type =~ /useconfig/) {

0 commit comments

Comments
 (0)