From: Ian Jackson Subject: Re: [PATCH V4 10/12] Introduce ts-debian-hvm-install Date: Wed, 2 Apr 2014 17:15:49 +0100 Message-ID: <21308.14261.606434.355136@mariner.uk.xensource.com> References: <1395418466-6997-1-git-send-email-wei.liu2@citrix.com> <1395418466-6997-11-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395418466-6997-11-git-send-email-wei.liu2@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: Wei Liu Cc: ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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; } 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. > + 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. Thanks, Ian.