From: Wei Liu Subject: Re: [PATCH V4 10/12] Introduce ts-debian-hvm-install Date: Wed, 2 Apr 2014 19:17:02 +0100 Message-ID: <20140402181701.GL6382@zion.uk.xensource.com> References: <1395418466-6997-1-git-send-email-wei.liu2@citrix.com> <1395418466-6997-11-git-send-email-wei.liu2@citrix.com> <21308.14261.606434.355136@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <21308.14261.606434.355136@mariner.uk.xensource.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 Jackson Cc: Wei Liu , ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Apr 02, 2014 at 05:15:49PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH V4 10/12] Introduce ts-debian-hvm-install"): > > This is debian hvm guest test case. It resembles ts-redhat-install: > > 1. prepare a auto install CD > > 2. install debian hvm guest, currently using OVMF > > 3. test if the guest is up > > Thanks. On this patch I have only trivial comments: > > > +our $stage=0; > > +if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; } > This comes from ts-redhat-install. My understanding is that it's used for debugging. By specifying --stage the test can bypass certain step such as guest installation. > What's this business for ? Is it just for debugging ? In which case > fine. > > > +sub prepare_initrd ($$$) { > > + my ($initrddir,$newiso,$preseed_file_path) = @_; > > + return <<"END"; > > + rm -rf $initrddir > > + mkdir $initrddir > > + cd $initrddir > > + gzip -d \< $newiso/install.amd/initrd.gz | cpio --extract --make-directories --no-absolute-filename > > I'm not sure why you have the \ in front of < and > here. > That's me being not familiar with perl string and too careful. Fixed. > > + my $newiso= "/root/$flight.$job.$gn-newiso"; > > + my $emptydir= "/root/$flight.$job.$gn-empty-dir"; > > + my $initrddir= "/root/$flight.$job.$gn-initrd-dir"; > > + my $preseed_file_path = "/root/$flight.$job.$gn-preseed"; > > This would be less messy and repetitive with an extra variable (to > encapsulate the prefix "/root/$flight.$job.$gn"), and/or perhaps a > mkdir. > Done. Wei. > Thanks, > Ian.