From nobody Fri Dec 19 18:29:51 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