From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in TestSupport.pm for nested test Date: Tue, 28 Apr 2015 08:41:38 +0100 Message-ID: <1430206898.12403.114.camel@citrix.com> References: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> <1428959990-24199-4-git-send-email-longtaox.pang@intel.com> <1429611542.4743.22.camel@citrix.com> <21814.17314.479011.970684@mariner.uk.xensource.com> <1429620780.4743.67.camel@citrix.com> <21814.20580.723370.301076@mariner.uk.xensource.com> <1429623708.4743.97.camel@citrix.com> <21814.24305.129814.960644@mariner.uk.xensource.com> <1429627421.4743.119.camel@citrix.com> <86C3224E41A7434B904EC364302132D80E49861C@SHSMSX101.ccr.corp.intel.com> <1429696139.6604.8.camel@citrix.com> <21815.39187.830857.53690@mariner.uk.xensource.com> <9E79D1C9A97CFD4097BCE431828FDD31BBA4F9@SHSMSX103.ccr.corp.intel.com> <1430127406.31307.60.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1430127406.31307.60.camel@localhost> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: robert.hu@intel.com Cc: "wei.liu2@citrix.com" , "Pang, LongtaoX" , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Mon, 2015-04-27 at 17:36 +0800, Robert Hu wrote: > On Thu, 2015-04-23 at 00:34 +0000, Hu, Robert wrote: > > > -----Original Message----- > > > From: Ian Jackson [mailto:Ian.Jackson@eu.citrix.com] > > > Sent: Wednesday, April 22, 2015 8:50 PM > > > To: Ian Campbell > > > Cc: Pang, LongtaoX; xen-devel@lists.xen.org; wei.liu2@citrix.com; Hu, Robert > > > Subject: Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in TestSupport.pm > > > for nested test > > > > > > Ian Campbell writes ("Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in > > > TestSupport.pm for nested test"): > > > > It will, I think, need to be integrated with the existing assignment to > > > > $ho->{Ip} in select host, so something like: > > > > > > > > if ( $r{"${ident}_ip"} ) { > > > > $ho->{Ip}= $r{"${ident}_ip"}; > > > > } else { > > > > $ho->{Ip}= $ho->{IpStatic}; > > > > } > > > > > > Yes. > > Yes, otherwise the code would go 'die' somewhere later. > Seems inevitably run into die in our nested test case, since our l1 host > shall not have IpStatic, while currently seems this is a necessary. > $ho->{IpStatic} = get_host_property($ho,'ip-addr'); > if (!defined $ho->{IpStatic}) { > my $ip_packed= gethostbyname($ho->{Fqdn}); > die "$ho->{Fqdn} ?" unless $ip_packed; > $ho->{IpStatic}= inet_ntoa($ip_packed); > die "$ho->{Fqdn} ?" unless defined $ho->{IpStatic}; > } > Shall we loosen this for nested l1 host? > i.e. die "$ho->{Fqdn} ?" unless $ip_packed || > $r{$ident_enable_nestedhvm} eq 'true'; I think all of the code you mentioned above should actually be in the else case of the example I gave, before the "$ho->{Ip}= $ho->{IpStatic};" Ian.