From patchwork Wed Feb 12 14:16:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 24545 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B93BB203F3 for ; Wed, 12 Feb 2014 14:18:41 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id k19sf23547209igc.3 for ; Wed, 12 Feb 2014 06:18:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=DmrQT6wR5IAUITkB92u4mhDCnxu/rXQoHjytYLU4jkE=; b=LyZNHCgaTFOn7W2NWtMcdLI0XCpOabLiTNlN0S1o8hRSPcGQqj3ZmdJ5gfoi49L0pJ YCKTyHIkhL1KNkUHZZ4emdbc7YDcSWDkh/JvGvaK2k0kR/x2KYQwMDgdtT8Euu8hstHN xFmFqUkWOcJwc2U0APWkxI5Zrs7/YGJtonC/YzkPnuZUNPW1mhAaU+XsUzWPY+hxW2TR dCpdaVKCGQSmMMdW8e+qTrlaOQlTFOb5I6H00lTRa7iwxw8JIXkkJr4ID6jFKyb/yDG5 G/rv63cx/0yB+bOp59j09/zxBT1CN2yw/E8hF+ST9G5hfUjGJi+ZANhcy8zGhkMBUnht X1OA== X-Gm-Message-State: ALoCoQmv2TGxAAhd+t7vQOLoSEYGziuKS/PAs6AyEdIGIA1F53ZUHU/bQmRzfXrx42gQ3KH5jbNl X-Received: by 10.50.18.49 with SMTP id t17mr1664077igd.3.1392214720953; Wed, 12 Feb 2014 06:18:40 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.51 with SMTP id o48ls2890986qgd.83.gmail; Wed, 12 Feb 2014 06:18:40 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr27296454vdc.1.1392214720815; Wed, 12 Feb 2014 06:18:40 -0800 (PST) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id t20si7357040vek.3.2014.02.12.06.18.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 06:18:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id q16so6941387vbe.21 for ; Wed, 12 Feb 2014 06:18:40 -0800 (PST) X-Received: by 10.52.166.103 with SMTP id zf7mr1463849vdb.30.1392214720718; Wed, 12 Feb 2014 06:18:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp3480vcz; Wed, 12 Feb 2014 06:18:39 -0800 (PST) X-Received: by 10.140.32.98 with SMTP id g89mr64209296qgg.37.1392214718042; Wed, 12 Feb 2014 06:18:38 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id c10si6734416qcg.23.2014.02.12.06.18.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 12 Feb 2014 06:18:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDac3-0000oL-Tw; Wed, 12 Feb 2014 14:16:31 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDac2-0000oG-7r for xen-devel@lists.xen.org; Wed, 12 Feb 2014 14:16:30 +0000 Received: from [85.158.137.68:44732] by server-1.bemta-3.messagelabs.com id 17/70-17293-C328BF25; Wed, 12 Feb 2014 14:16:28 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1392214586!127602!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15271 invoked from network); 12 Feb 2014 14:16:28 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-13.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 12 Feb 2014 14:16:28 -0000 X-IronPort-AV: E=Sophos;i="4.95,832,1384300800"; d="scan'208";a="100126686" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 12 Feb 2014 14:16:26 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Wed, 12 Feb 2014 09:16:25 -0500 Received: from spare.cam.xci-test.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1WDabx-0007lr-Hp; Wed, 12 Feb 2014 14:16:25 +0000 From: Ian Campbell To: Date: Wed, 12 Feb 2014 14:16:25 +0000 Message-ID: <1392214585-26602-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST] Allow per-host TFTP setup X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: I run osstest against machines which are in both the XenServer and XenClient administrative domains, and hence which have different TFTP servers, accessible locally via different NFS mounted paths. Make it possible to specify various bits of TFTP path via ~/.xen-osstest/config Signed-off-by: Ian Campbell --- Osstest/Debian.pm | 6 +++++- Osstest/TestSupport.pm | 5 ++++- ts-host-install | 16 ++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 6759263..a70d35b 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -554,7 +554,11 @@ END foreach my $kp (keys %{ $ho->{Flags} }) { $kp =~ s/need-kernel-deb-// or next; - my $d_i= $c{TftpPath}.'/'.$c{TftpDiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite}; + my $tftppath = get_host_property($ho, "TftpPath", $c{TftpPath}); + my $tftpdibase = get_host_property($ho, "TftpDiBase", $c{TftpDiBase}); + my $tftpdiversion = get_host_property($ho, "TftpDiVersion", $c{TftpDiVersion}); + + my $d_i= $tftppath.'/'.$tftpdibase.'/'.$r{arch}.'/'.$tftpdiversion.'-'.$ho->{Suite}; my $kurl = create_webfile($ho, "kernel", sub { copy("$d_i/$kp.deb", $_[0]); diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index a513540..5c01ffa 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1839,8 +1839,11 @@ sub host_pxefile ($) { sub setup_pxeboot ($$) { my ($ho, $bootfile) = @_; + my $p= get_host_property($ho, "TftpPath", $c{TftpPath}); + my $d= get_host_property($ho, "TftpPxeDir", $c{TftpPxeDir}); my $f= host_pxefile($ho); - file_link_contents("$c{TftpPath}$c{TftpPxeDir}$f", $bootfile); + + file_link_contents("$p$d$f", $bootfile); } sub setup_pxeboot_local ($) { diff --git a/ts-host-install b/ts-host-install index 5c0018e..2e711fe 100755 --- a/ts-host-install +++ b/ts-host-install @@ -122,19 +122,23 @@ END sub setup_pxeboot_firstboot($) { my ($ps_url) = @_; - my $d_i= $c{TftpDiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite}; + my $tftppath = get_host_property($ho, "TftpPath", $c{TftpPath}); + my $tftpdibase = get_host_property($ho, "TftpDiBase", $c{TftpDiBase}); + my $tftpdiversion = get_host_property($ho, "TftpDiVersion", $c{TftpDiVersion}); + + my $d_i= $tftpdibase.'/'.$r{arch}.'/'.$tftpdiversion.'-'.$ho->{Suite}; my @installcmdline= qw(vga=normal); push @installcmdline, di_installcmdline_core($ho, $ps_url, %xopts); my $src_initrd= "$d_i/initrd.gz"; - my @initrds= "$c{TftpPath}/$src_initrd"; + my @initrds= "$tftppath/$src_initrd"; my $kernel; foreach my $fp (keys %{ $ho->{Flags} }) { $fp =~ s/^need-firmware-deb-// or next; - my $cpio= "$c{TftpPath}/$d_i/$fp.cpio.gz"; + my $cpio= "$tftppath/$d_i/$fp.cpio.gz"; if (stat $cpio) { logm("using firmware from: $cpio"); push @initrds, $cpio; @@ -147,7 +151,7 @@ sub setup_pxeboot_firstboot($) { foreach my $kp (keys %{ $ho->{Flags} }) { $kp =~ s/need-kernel-deb-// or next; - my $kern= "$c{TftpPath}/$d_i/linux.$kp"; + my $kern= "$tftppath/$d_i/linux.$kp"; if (stat $kern) { logm("using kernel from: $kern"); $kernel = "/$d_i/linux.$kp"; @@ -157,7 +161,7 @@ sub setup_pxeboot_firstboot($) { die "$kp $kern $!"; } - my $cpio= "$c{TftpPath}/$d_i/$kp.cpio.gz"; + my $cpio= "$tftppath/$d_i/$kp.cpio.gz"; if (stat $cpio) { logm("using kernel modules from: $cpio"); push @initrds, $cpio; @@ -195,7 +199,7 @@ END logm("using initrds: @initrds"); my $initrd= "$c{TftpTmpDir}$ho->{Name}--initrd.gz"; - system_checked("cat -- @initrds >$c{TftpPath}$initrd"); + system_checked("cat -- @initrds >$tftppath$initrd"); push @installcmdline, ("initrd=/$initrd", "domain=$c{TestHostDomain}",