public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ktest: take submenu into account
@ 2017-09-22  4:38 Satoru Takeuchi
  2017-10-04 15:39 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Satoru Takeuchi @ 2017-09-22  4:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt (VMware)

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().

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
---
 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 0c8b61f..6cf135a 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1821,7 +1821,7 @@ sub get_grub2_index {
 	    $grub_number++;
 	    $found = 1;
 	    last;
-	} elsif (/^menuentry\s/) {
+	} elsif (/^menuentry\s|^submenu\s/) {
 	    $grub_number++;
 	}
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ktest: take submenu into account
  2017-09-22  4:38 [PATCH] ktest: take submenu into account Satoru Takeuchi
@ 2017-10-04 15:39 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2017-10-04 15:39 UTC (permalink / raw)
  To: Satoru Takeuchi; +Cc: linux-kernel

On Fri, 22 Sep 2017 13:38:19 +0900
Satoru Takeuchi <satoru.takeuchi@gmail.com> wrote:

> 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().
> 
> Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>

Thanks for sending this. I was traveling (Embedded and Kernel Recipes)
and just saw this email now. I'll add it to my priority todo list. I'll
look at it and if all goes well, it should make the next merge window.

-- Steve

> ---
>  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 0c8b61f..6cf135a 100755
> --- a/tools/testing/ktest/ktest.pl
> +++ b/tools/testing/ktest/ktest.pl
> @@ -1821,7 +1821,7 @@ sub get_grub2_index {
>  	    $grub_number++;
>  	    $found = 1;
>  	    last;
> -	} elsif (/^menuentry\s/) {
> +	} elsif (/^menuentry\s|^submenu\s/) {
>  	    $grub_number++;
>  	}
>      }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-04 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22  4:38 [PATCH] ktest: take submenu into account Satoru Takeuchi
2017-10-04 15:39 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox