From: Ian Campbell <ian.campbell@citrix.com>
To: "longtao.pang" <longtaox.pang@intel.com>
Cc: wei.liu2@citrix.com, robert.hu@intel.com,
Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [OSSTEST Nested PATCH v7 1/6] parsing grub which has 'submenu' primitive
Date: Tue, 31 Mar 2015 14:44:18 +0100 [thread overview]
Message-ID: <1427809458.2115.134.camel@citrix.com> (raw)
In-Reply-To: <1427497587-22884-2-git-send-email-longtaox.pang@intel.com>
On Fri, 2015-03-27 at 19:06 -0400, longtao.pang wrote:
> From a hvm kernel build from Linux stable Kernel tree,
> the auto generated grub2 menu will have 'submenu' primitive, upon the
> 'menuentry' items. Xen boot entries will be grouped into a submenu. This
> patch adds capability to support such grub formats.
>
> Signed-off-by: longtao.pang <longtaox.pang@intel.com>
> ---
> Changes in v7:
> Remove the reformatting change for Debian.pm and keep the original format.
Thank you.
> ---
> Osstest/Debian.pm | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> index 6784024..35163a0 100644
> --- a/Osstest/Debian.pm
> +++ b/Osstest/Debian.pm
> @@ -398,10 +398,18 @@ sub setupboot_grub2 ($$$$) {
>
> my $count= 0;
> my $entry;
> + my $submenu;
> while (<$f>) {
> next if m/^\s*\#/ || !m/\S/;
> if (m/^\s*\}\s*$/) {
> - die unless $entry;
> + die unless $entry || $submenu;
> + if(!defined $entry && defined $submenu){
> + logm("Met end of a submenu starting from ".
> + "$submenu->{StartLine}. ".
> + "Our want kern is $want_kernver");
> + $submenu=undef;
> + next;
> + }
> my (@missing) =
> grep { !defined $entry->{$_} }
> (defined $xenhopt
> @@ -432,21 +440,24 @@ sub setupboot_grub2 ($$$$) {
> $entry= { Title => $1, StartLine => $., Number => $count };
> $count++;
> }
> - if (m/^\s*multiboot\s*\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
> + if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
> + $submenu={ StartLine =>$.};
> + }
This looks reasonable enough to support a single nesting, I suppose we
can leave more deeply nested submenus for another time.
So in that regard this patch looks ok to me.
> + if (m/^\s*multiboot\s*(?:\/boot)*\/(xen\S+)/) {
> die unless $entry;
> $entry->{Hv}= $1;
> }
> - if (m/^\s*multiboot\s*\/(vmlinu[xz]-(\S+))/) {
> + if (m/^\s*multiboot\s*(?:\/boot)*\/(vmlinu[xz]-(\S+))/) {
What are these changes all about? I think they must be unrelated to the
use of submenu (perhaps relate to having a separate /boot or not?). If
so then please do in a separate patch.
If this is somehow to do with submenu then please explain how/why in the
commit log.
BTW, your regex as it stand will accept /boot/boot/boot/boot/vmlinuz. I
think you maybe meant to add "(?:\/boot)?" to match zero or one
occurrences?
Ian.
next prev parent reply other threads:[~2015-03-31 13:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 23:06 [OSSTEST Nested PATCH v7 0/6] Introduction of netsted HVM test job longtao.pang
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 1/6] parsing grub which has 'submenu' primitive longtao.pang
2015-03-31 13:44 ` Ian Campbell [this message]
2015-04-01 1:42 ` Hu, Robert
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 2/6] Edit some testsupport APIs for nested test longtao.pang
2015-03-31 13:49 ` Ian Campbell
2015-04-01 5:56 ` Pang, LongtaoX
2015-04-01 8:50 ` Ian Campbell
2015-03-31 14:20 ` Ian Campbell
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 3/6] Changes on test step of debain hvm guest install longtao.pang
2015-03-31 13:55 ` Ian Campbell
2015-04-01 8:19 ` Pang, LongtaoX
2015-04-01 8:53 ` Ian Campbell
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 4/6] Add new script to custmize nested test configuration longtao.pang
2015-03-31 14:13 ` Ian Campbell
2015-04-01 8:45 ` Pang, LongtaoX
2015-04-01 8:58 ` Ian Campbell
2015-04-09 7:12 ` Pang, LongtaoX
2015-04-15 9:31 ` Ian Campbell
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 5/6] Add test job for nest test case longtao.pang
2015-03-31 14:23 ` Ian Campbell
2015-04-01 8:27 ` Pang, LongtaoX
2015-04-01 9:06 ` Ian Campbell
2015-04-02 8:16 ` Pang, LongtaoX
2015-04-02 9:15 ` Ian Campbell
2015-03-27 23:06 ` [OSSTEST Nested PATCH v7 6/6] Compose the main recipe of nested test job longtao.pang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427809458.2115.134.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=longtaox.pang@intel.com \
--cc=robert.hu@intel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.