From nobody Fri Nov 29 10:26:31 2024 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 E2A39EEB5 for ; Sun, 22 Sep 2024 06:38:11 +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=1726987091; cv=none; b=VzQ1eDSgre5gttLCM6hOBEVk+WV/JJLEOXpOvyrke9zf52Gv5iCbifnKRKYy/Yo/r+B9HAe8eHp19MEu2Dli1lEMEgkBWJ2l7ud2CcJL2E5Esw79gxk2LEI+Vde/SDc+KSYavUMOFhklc+T8nVQtp+cpvFEm9GMR+WUqBsloSB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726987091; c=relaxed/simple; bh=TrM3S0L6RmZf+9Y4xzWaUhdnlz+wHl5YXH4DKlpfT8k=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=kBrMBEAOLtqkk+IphoMijpZsurLs2G88gaYEAEx0PcGOdLhnr57GYkc9u8prLnLaHwXuv6VnZvjSCG4hRvwwPoy1t2BdQ74/Vb0kDni2SB5l5xjM+MDAPCCKqEa8xsSH4oXDAQUQDwgGOZoRaKQ2/dLC6R5pcWYXYmUWVDwA7Wc= 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 E0FE2C4CEC3; Sun, 22 Sep 2024 06:38:09 +0000 (UTC) Date: Sun, 22 Sep 2024 02:38:05 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , John 'Warthog9' Hawley , Daniel Jordan Subject: [GIT PULL] ktest.pl: Updates for 6.12 Message-ID: <20240922023805.044eba62@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (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" 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; =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 { @@ -2047,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; @@ -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; + } } } }