diff options
author | Satoru Takeuchi <satoru.takeuchi@gmail.com> | 2017-09-22 13:38:19 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-10 15:49:14 -0400 |
commit | 6cd110a91f52197e3392809cd43466bfe2c524d0 (patch) | |
tree | e0bf145af0d7976489783e3b939580434f478c3e | |
parent | c2d84ddb338c829e3ee9d1af6a55325998fcdb82 (diff) | |
download | linux-6cd110a91f52197e3392809cd43466bfe2c524d0.tar.gz linux-6cd110a91f52197e3392809cd43466bfe2c524d0.tar.bz2 linux-6cd110a91f52197e3392809cd43466bfe2c524d0.zip |
ktest: Take submenu into account for grub2 menus
grub-reboot selects the submenu's first menuentry (title is "1>0") rather than ktest's
menuentry (title is "2") by mistake.
===
$ sudo cat /boot/grub/grub.cfg | grep -E "^menuentry|^submenu"
...
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option '...' {
...
submenu 'Advanced options for Ubuntu' $menuentry_id_option '...' {
...
menuentry 'ktest' {
...
===
Correct it by taking submenu entries into account in get_grub2_index().
Link: http://lkml.kernel.org/r/87poaje4as.wl-satoru.takeuchi@gmail.com
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-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 a14fc309d140..777388cc8221 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1872,7 +1872,7 @@ sub get_grub2_index { $grub_number++; $found = 1; last; - } elsif (/^menuentry\s/) { + } elsif (/^menuentry\s|^submenu\s/) { $grub_number++; } } |