|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [osstest test] 56922: regressions - FAIL
On Sat, 2015-05-23 at 11:35 +0800, Robert Hu wrote:
> On Fri, 2015-05-22 at 15:21 +0100, Ian Campbell wrote:
> > On Fri, 2015-05-22 at 14:42 +0100, Ian Campbell wrote:
> > > From my particular grub.cfg. For real usage setupboot_grub2 will
> > > obviously need to become cleverer to count things correctly.
> >
> > I've not tested extensively but the following incremental patch seems to
> > do the right thing, at least by inspection of the resulting grub.cfg.
> >
> > Needs more testing (e.g. I haven't tried non-XSM yet) and review from
> > Ian I think, since there may be a more idiomatically Perl way to
> > manipulate the @offsets array (in particular shrinking it).
> Thanks Ian. You are so quick. I wrote that piece of code almost a year
> ago; was just about to warm up.
> We're to test your fix in our environment as well on non-XSM.
Just furbished up that piece of code. Now I recall the memory. This
piece of code was developed before 'XSM' things introduced; though now
after XSM things merged. May I know what is 'xsm' stuff?
Can you send me the 'grub.cfg' of those 'xsm' cases? so that I can take
a look.
> > Ian.
> >
> > diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> > index 282175b..b5148fd 100644
> > --- a/Osstest/Debian.pm
> > +++ b/Osstest/Debian.pm
> > @@ -393,8 +393,6 @@ sub setupboot_grub1 ($$$$) {
> > # Note on running OSSTest on Squeeze with old Xen kernel: check out
> > # Debian bug #633127 "/etc/grub/20_linux does not recognise some old
> > # Xen kernels"
> > -# Currently setupboot_grub2 relies on Grub menu not having submenu.
> > -# Check Debian bug #690538.
> > sub setupboot_grub2 ($$$$) {
> > my ($ho,$want_kernver,$want_xsm,$xenhopt,$xenkopt) = @_;
> > my $bl= { };
> > @@ -405,7 +403,7 @@ sub setupboot_grub2 ($$$$) {
> > my $parsemenu= sub {
> > my $f= bl_getmenu_open($ho, $rmenu,
> > "$stash/$ho->{Name}--grub.cfg.1");
> >
> > - my $count= 0;
> > + my @offsets = (0);
> > my $entry;
> > my $submenu;
> > while (<$f>) {
> > @@ -417,6 +415,8 @@ sub setupboot_grub2 ($$$$) {
> > "$submenu->{StartLine}. ".
> > "Our want kern is $want_kernver");
> > $submenu=undef;
> > + $#offsets = $#offsets-1;
> > + $offsets[$#offsets]++;
> > next;
> > }
> > my (@missing) =
> > @@ -446,11 +446,12 @@ sub setupboot_grub2 ($$$$) {
> > }
> > if (m/^menuentry\s+[\'\"](.*)[\'\"].*\{\s*$/) {
> > die $entry->{StartLine} if $entry;
> > - $entry= { Title => $1, StartLine => $., Number => $count };
> > - $count++;
> > + $entry= { Title => $1, StartLine => $., MenuEntryPath =>
> > join ">", @offsets };
> > + $offsets[$#offsets]++;
> > }
> > if (m/^submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
> > - $submenu={ StartLine =>$.};
> > + $submenu={ StartLine =>$., MenuEntryPath => join ">",
> > @offsets };
> > + $offsets[$#offsets+1] = 0;
> > }
> > if (m/^\s*multiboot\s*(?:\/boot)?\/(xen\S+)/) {
> > die unless $entry;
> > @@ -511,7 +512,7 @@ sub setupboot_grub2 ($$$$) {
> > }
> > print ::EO <<END or die $!;
> >
> > -GRUB_DEFAULT=$entry->{Number}
> > +GRUB_DEFAULT="$entry->{MenuEntryPath}"
> > END
> >
> > print ::EO <<END or die $! if defined $xenhopt;
> >
> >
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |