From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
John 'Warthog9' Hawley <warthog9@kernel.org>,
Daniel Jordan <daniel.m.jordan@oracle.com>
Subject: [GIT PULL] ktest.pl: Updates for 6.12
Date: Sun, 22 Sep 2024 02:38:05 -0400 [thread overview]
Message-ID: <20240922023805.044eba62@rorschach.local.home> (raw)
Linus,
ktest.pl updates for 6.12:
- Add notification of build warnings for all tests
Currently, the build will only fail on warnings if the ktest config file
states that it should fail or if the compile is done with -Werror. This
has allowed warnings to sneak in if it doesn't fail. Add a notification at
the end of the test that will state that warnings were found in the build
so that the developer will be aware of it.
- Fix the grub2 parser to not return the wrong kernel index
ktest.pl can read the grub.cfg file to know what kernel to boot to via
grub-reboot. This requires knowing the index that the kernel is referenced
by in the grub.cfg file. Some distros have logic to determine the
menuentry that can cause the ktest.pl to come up with the wrong index and
boot the wrong kernel.
Please pull the latest ktest-v6.12 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git
ktest-v6.12
Tag SHA1: 3224d5d52aef011ccbbb82a8f52e51f1c4f1ba52
Head SHA1: 2351e8c65404aabc433300b6bf90c7a37e8bbc4d
Daniel Jordan (1):
ktest.pl: Avoid false positives with grub2 skip regex
Steven Rostedt (1):
ktest.pl: Always warn on build warnings
----
tools/testing/ktest/ktest.pl | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
---------------------------
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index eb31cd9c977b..dacad94e2be4 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -222,6 +222,8 @@ my $install_time;
my $reboot_time;
my $test_time;
+my $warning_found = 0;
+
my $pwd;
my $dirname = $FindBin::Bin;
@@ -729,11 +731,18 @@ sub print_times {
show_time($test_time);
doprint "\n";
}
+ if ($warning_found) {
+ doprint "\n*** WARNING";
+ doprint "S" if ($warning_found > 1);
+ doprint " found in build: $warning_found ***\n\n";
+ }
+
# reset for iterations like bisect
$build_time = 0;
$install_time = 0;
$reboot_time = 0;
$test_time = 0;
+ $warning_found = 0;
}
sub get_mandatory_configs {
@@ -2047,7 +2056,7 @@ sub get_grub_index {
} elsif ($reboot_type eq "grub2") {
$command = "cat $grub_file";
$target = '^\s*menuentry.*' . $grub_menu_qt;
- $skip = '^\s*menuentry';
+ $skip = '^\s*menuentry\s';
$submenu = '^\s*submenu\s';
} elsif ($reboot_type eq "grub2bls") {
$command = $grub_bls_get;
@@ -2460,8 +2469,6 @@ sub process_warning_line {
# Returns 1 if OK
# 0 otherwise
sub check_buildlog {
- return 1 if (!defined $warnings_file);
-
my %warnings_list;
# Failed builds should not reboot the target
@@ -2482,18 +2489,21 @@ sub check_buildlog {
close(IN);
}
- # If warnings file didn't exist, and WARNINGS_FILE exist,
- # then we fail on any warning!
-
open(IN, $buildlog) or dodie "Can't open $buildlog";
while (<IN>) {
if (/$check_build_re/) {
my $warning = process_warning_line $_;
if (!defined $warnings_list{$warning}) {
- fail "New warning found (not in $warnings_file)\n$_\n";
- $no_reboot = $save_no_reboot;
- return 0;
+ $warning_found++;
+
+ # If warnings file didn't exist, and WARNINGS_FILE exist,
+ # then we fail on any warning!
+ if (defined $warnings_file) {
+ fail "New warning found (not in $warnings_file)\n$_\n";
+ $no_reboot = $save_no_reboot;
+ return 0;
+ }
}
}
}
next reply other threads:[~2024-09-22 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-22 6:38 Steven Rostedt [this message]
2024-09-22 16:58 ` [GIT PULL] ktest.pl: Updates for 6.12 pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240922023805.044eba62@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=daniel.m.jordan@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=warthog9@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox