From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hu Subject: Re: [osstest test] 56922: regressions - FAIL Date: Mon, 25 May 2015 10:25:29 +0800 Message-ID: <1432520729.27440.3.camel@localhost> References: <1432288654.10746.161.camel@citrix.com> <1432294374.14664.12.camel@citrix.com> <1432297842.14664.32.camel@citrix.com> <1432298867.26800.5.camel@localhost> <1432299517.14664.37.camel@citrix.com> <1432302144.14664.43.camel@citrix.com> <1432304517.14664.48.camel@citrix.com> <1432369911.12629.5.camel@localhost> <1432371223.12629.11.camel@localhost> <1432475590.5748.160.camel@citrix.com> Reply-To: robert.hu@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432475590.5748.160.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: robert.hu@intel.com, "Pang, LongtaoX" , ian.jackson@eu.citrix.com, xen-devel List-Id: xen-devel@lists.xenproject.org On Sun, 2015-05-24 at 14:53 +0100, Ian Campbell wrote: > On Sat, 2015-05-23 at 16:53 +0800, Robert Hu wrote: > > > > + $#offsets = $#offsets-1; > > > > + $offsets[$#offsets]++; > > may consider 'pop/push' operations on @offsets array? I worry about if > > '$#offsets-1' can always shrink array size correctly. pop/push anyway is > > some official way to do this. > > Assigning to $#offsets is defined to change the length of the array. But > I think you are correct that pop/push would be a more idiomatic way to > do this. > > It is a public holiday on Monday, but I'll take a look on Tuesday, > unless you fancy doing it in the meantime. Sure I will do this. > > > @@ -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 }; > > Here MenuEntryPath element for $submenu is actually debug purpose only, > > I think, may be can remove it. correct me if I'm wrong. > > It is just for debug, I think it would be OK to leave it though. > > Ian. >