diff options
author | Daniel Jordan <daniel.m.jordan@oracle.com> | 2024-09-04 13:55:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-17 15:24:16 +0200 |
commit | 6ba8ecf9aa4e0ebf400b6e3e00e580569a623e58 (patch) | |
tree | d5d2b88ee578e653c5c7986b15bb1d2c1370510a /tools | |
parent | 5d5e3b4cbe8ee16b7bf96fd73a421c92a9da3ca1 (diff) | |
download | linux-rpi-6ba8ecf9aa4e0ebf400b6e3e00e580569a623e58.tar.gz linux-rpi-6ba8ecf9aa4e0ebf400b6e3e00e580569a623e58.tar.bz2 linux-rpi-6ba8ecf9aa4e0ebf400b6e3e00e580569a623e58.zip |
ktest.pl: Avoid false positives with grub2 skip regex
[ Upstream commit 2351e8c65404aabc433300b6bf90c7a37e8bbc4d ]
Some distros have grub2 config files with the lines
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
which match the skip regex defined for grub2 in get_grub_index():
$skip = '^\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 <daniel.m.jordan@oracle.com>
Acked-by: John 'Warthog9' Hawley (Tenstorrent) <warthog9@eaglescrag.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 24451f8f4291..045090085ac5 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -2043,7 +2043,7 @@ sub get_grub_index { } elsif ($reboot_type eq "grub2") { $command = "cat $grub_file"; $target = '^\s*menuentry.*' . $grub_menu_qt; - $skip = '^\s*menuentry'; + $skip = '^\s*menuentry\s'; $submenu = '^\s*submenu\s'; } elsif ($reboot_type eq "grub2bls") { $command = $grub_bls_get; |