From nobody Sun Feb 8 18:32:58 2026 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 472171591E3 for ; Mon, 19 Aug 2024 21:20:03 +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=1724102404; cv=none; b=p/W8hzxr9Kg5c4oUSCtJG65JIBYKk2jLu5+25pkDbli9JWUJv+Azq+d7s6v9SEAf1QBHn0s6JdwXGUs4prma8RuWys+7Mu1EvFgl3g2EhgM1qJrmCb2db0cklAa6xesZuJ0AH5OdMFegkIZq0WKmhvRs+a/54eXL2te6+yNVpBU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724102404; c=relaxed/simple; bh=geBg7oorSdiRSuO2UKmQ8oDVSavpaFjuxoK3dPTIuVI=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=os55TA8rLkuXOpFj4OCfogc/GPxfsDiPulShOjJneUXQc1bmnv7/Us1z2RIwYAxaW+v0nARPzKzQkLAmV3uM8ZcDlTKn+46yh8jMHwunxKUIbOYtRVA6nAEjclfZWNRVKuiwegGDP0MqQA3UA7wKemrA8yDrxTVxqdqOAjRldq8= 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 678EFC4AF0E; Mon, 19 Aug 2024 21:20:03 +0000 (UTC) Date: Mon, 19 Aug 2024 17:20:28 -0400 From: Steven Rostedt To: LKML Cc: John 'Warthog9' Hawley Subject: [PATCH] ktest.pl: Always warn on build warnings Message-ID: <20240819172028.3a7fae09@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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. Signed-off-by: Steven Rostedt Acked-by: John 'Warthog9' Hawley (Tenstorrent) --- 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