OpenCloudOS-Kernel/tools/testing/ktest
Daniel Jordan 6ba8ecf9aa 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>
2024-10-17 15:24:16 +02:00
..
examples bootconfig/tracing/ktest: Update ktest example for boot-time tracing 2021-08-16 11:39:51 -04:00
compare-ktest-sample.pl tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
config-bisect.pl ktest: Fix some typos in config-bisect.pl 2019-07-24 15:37:18 -04:00
ktest.pl ktest.pl: Avoid false positives with grub2 skip regex 2024-10-17 15:24:16 +02:00
sample.conf ktest.pl: Add RUN_TIMEOUT option with default unlimited 2023-02-20 11:52:27 -05:00