From nobody Fri Dec 19 16:43:15 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75C371E632B for ; Wed, 4 Sep 2024 19:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725477274; cv=none; b=GZbeJMsHDg2kPjP8YfjrLkCxiOdDjdgj2ZHNK001HpooBJ0x0VEvNnCQ/Jhu7E/7SSH4dGgo3O2ngmH8AdIuzng2lkJOtLcqEXRRwLKb1xgSHqwmw8fEG4TN1X8hLU+3XG2QwRBw92uxUuf2nbxy0ybJLbEArzQ5Bws4tQltFAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725477274; c=relaxed/simple; bh=ocIbq0VaqldyWEkg1BzYXbiz3X2p5bsJ1TEONFzS2cs=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=ATG59Z4eO/Lbo9ievsKCZd3w0jSZvDNi8wfr/JHOBRS1f1A0DcMF7ztx4lsRYWp2WB/f35AwKTCsHscPxusEjJrpBGX5yGn7D6VPAkDe300Hj/aW75v0lWqwja6U26kulOyrzV6yD27faiP0hSDIyORZruYJvOwZP6uPtRDMVec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DED6C4AF09; Wed, 4 Sep 2024 19:14:34 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1slvTb-000000059Dp-2ueg; Wed, 04 Sep 2024 15:15:35 -0400 Message-ID: <20240904191535.550567736@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 04 Sep 2024 15:15:15 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" , "John Warthog9 Hawley (Tenstorrent)" Subject: [for-next][PATCH 1/2] ktest.pl: Always warn on build warnings References: <20240904191514.942314784@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt If a warning happens at build, give a warning at the end: Build time: 1 minute 40 seconds Install time: 17 seconds Reboot time: 25 seconds *** WARNING found in build: 1 *** ******************************************* ******************************************* KTEST RESULT: TEST 1 SUCCESS!!!! ** ******************************************* ******************************************* This way, even if the test isn't made to fail on warnings during the build, a message is still displayed that warnings were found. Link: https://lore.kernel.org/<20240819172028.3a7fae09@gandalf.local.home> Acked-by: John 'Warthog9' Hawley (Tenstorrent) Signed-off-by: Steven Rostedt --- tools/testing/ktest/ktest.pl | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index eb31cd9c977b..c82b8d55dddb 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; =20 +my $warning_found =3D 0; + my $pwd; my $dirname =3D $FindBin::Bin; =20 @@ -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 =3D 0; $install_time =3D 0; $reboot_time =3D 0; $test_time =3D 0; + $warning_found =3D 0; } =20 sub get_mandatory_configs { @@ -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; =20 # Failed builds should not reboot the target @@ -2482,18 +2489,21 @@ sub check_buildlog { close(IN); } =20 - # 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 () { if (/$check_build_re/) { my $warning =3D process_warning_line $_; =20 if (!defined $warnings_list{$warning}) { - fail "New warning found (not in $warnings_file)\n$_\n"; - $no_reboot =3D $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 =3D $save_no_reboot; + return 0; + } } } } --=20 2.43.0 From nobody Fri Dec 19 16:43:15 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D192D1E633A for ; Wed, 4 Sep 2024 19:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725477274; cv=none; b=alNc8nFT+5K90AFdDgjNs2Icrrhnh4g3eeXiwZ+JbG4hxyw88DJt/ChzNS7cddB7FAI0cYSY8QEm58xK0CoruVtjDvSPr6bRrKncLNheoPgjFKmkL07vx0LgMlQMu4943G/RESxR8G8AFvvrkpdMR0MgNJQVpNHLDcVFiYNNFQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725477274; c=relaxed/simple; bh=gIz4nWG8vW2Bq5DEc4OdSKXvO7Od/Jr4iRyvbvu+l6E=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=BVJjCgVOuWEV2ovoHtjsAxDH+mh/UBP5gvaBdALAKdXa1hz7AIBwLLqvjY4yODA4VDGKoCIu3x4h5KWRiIAhYx7jpgmGpfZcQifQ/T0JleaPfreDeZO1eteu2nAArEJJeVJV4w5/4knvaxMPSpp0q0vGpBEdFby9d2UQzlxQozw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7375FC4CECB; Wed, 4 Sep 2024 19:14:34 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1slvTb-000000059EK-3aev; Wed, 04 Sep 2024 15:15:35 -0400 Message-ID: <20240904191535.714583011@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 04 Sep 2024 15:15:16 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" , Daniel Jordan , "John Warthog9 Hawley (Tenstorrent)" Subject: [for-next][PATCH 2/2] ktest.pl: Avoid false positives with grub2 skip regex References: <20240904191514.942314784@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Daniel Jordan Some distros have grub2 config files with the lines if [ x"${feature_menuentry_id}" =3D xy ]; then menuentry_id_option=3D"--id" else menuentry_id_option=3D"" fi which match the skip regex defined for grub2 in get_grub_index(): $skip =3D '^\s*menuentry'; These false positives cause the grub number to be higher than it should be, and the wrong kernel can end up booting. Grub documents the menuentry command with whitespace between it and the title, so make the skip regex reflect this. Link: https://lore.kernel.org/20240904175530.84175-1-daniel.m.jordan@oracle= .com Signed-off-by: Daniel Jordan Acked-by: John 'Warthog9' Hawley (Tenstorrent) Signed-off-by: Steven Rostedt --- tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index c82b8d55dddb..dacad94e2be4 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -2056,7 +2056,7 @@ sub get_grub_index { } elsif ($reboot_type eq "grub2") { $command =3D "cat $grub_file"; $target =3D '^\s*menuentry.*' . $grub_menu_qt; - $skip =3D '^\s*menuentry'; + $skip =3D '^\s*menuentry\s'; $submenu =3D '^\s*submenu\s'; } elsif ($reboot_type eq "grub2bls") { $command =3D $grub_bls_get; --=20 2.43.0