From nobody Fri Dec 19 18:28:27 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