From patchwork Thu Jul 6 14:42:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9828463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9540360361 for ; Thu, 6 Jul 2017 14:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86AF4285EA for ; Thu, 6 Jul 2017 14:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BA3B2864F; Thu, 6 Jul 2017 14:45:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E96F285EA for ; Thu, 6 Jul 2017 14:45:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dT7zT-0008EZ-OX; Thu, 06 Jul 2017 14:42:47 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dT7zS-0008Cl-HT for xen-devel@lists.xenproject.org; Thu, 06 Jul 2017 14:42:46 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id 2F/9B-01862-56C4E595; Thu, 06 Jul 2017 14:42:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsXitHSDvW6qT1y kwdpX0hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bGJTEFXXwVf4+9Y2lg/MLVxcjJISHgL7H7 1z1mEJtNQEfi4tydbF2MHBwiAioSt/cagISZBdwl7lxYxARiCwOV3/7czgZiswCV3Px0nBHE5 hWwlJh2aREjxEg9ibcTX4DZnAJWEqevfAGzhYBq9n1tZoaoF5Q4OfMJC8R8TYnW7b/ZIWx5ie ats5kh6hUl+uc9YJvAyDcLScssJC2zkLQsYGRexahRnFpUllqka2Sol1SUmZ5RkpuYmaNraGC sl5taXJyYnpqTmFSsl5yfu4kRGGj1DAyMOxh79vodYpTkYFIS5a0wj4sU4kvKT6nMSCzOiC8q zUktPsQow8GhJMG70AsoJ1iUmp5akZaZAwx5mLQEB4+SCO9pZ6A0b3FBYm5xZjpE6hSjLserC f+/MQmx5OXnpUqJ8/J7AxUJgBRllObBjYDF3yVGWSlhXkYGBgYhnoLUotzMElT5V4ziHIxKwr xmIFN4MvNK4Da9AjqCCegIxcYYkCNKEhFSUg2MfNu9G0ur/sxyFQsweKW1XE+V63JPxC6Rp0v eHn7AfZ0r9vyP72/yA59bN74NdpMTDn53zs6BSXJ906T4f6xzUh1kVNdqqxo+ZD/z8Ajn1S8T 35qfjZ9lr1Tj8rN4/eNy/e7UNS7nHefn+3t88yl+vC3oI6uyrwOr1gybx9n/+k+UX7g586W6E ktxRqKhFnNRcSIADKdzk7oCAAA= X-Env-Sender: prvs=3536ba782=roger.pau@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1499352162!46184956!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26160 invoked from network); 6 Jul 2017 14:42:45 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jul 2017 14:42:45 -0000 X-IronPort-AV: E=Sophos;i="5.40,317,1496102400"; d="scan'208";a="438999880" From: Roger Pau Monne To: Date: Thu, 6 Jul 2017 15:42:14 +0100 Message-ID: <20170706144227.36580-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170706144227.36580-1-roger.pau@citrix.com> References: <20170706144227.36580-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian.Jackson@eu.citrix.com, Roger Pau Monne Subject: [Xen-devel] [PATCH v4 03/16] osstest: introduce helper to get per-host tftp prefix X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is used in order to get the per-host tftp prefix, used to store the host initrd file. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Changes since v1: - New in this version. --- Osstest/TestSupport.pm | 8 +++++++- ts-host-install | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 88606b04..e30e5759 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -69,7 +69,7 @@ BEGIN { target_run_apt target_install_packages target_install_packages_norec target_jobdir target_extract_jobdistpath_subdir - target_extract_jobdistpath + target_extract_jobdistpath target_tftp_prefix lv_create lv_dev_mapper poll_loop tcpconnect await_tcp @@ -2337,6 +2337,12 @@ sub target_extract_jobdistpath ($$$$$) { target_cmd_root($ho, "cd / && tar -hzxf $distcopy", 300); } +sub target_tftp_prefix ($) { + my ($ho) = @_; + + return "$ho->{Tftp}{TmpDir}/" . hostnamepath($ho); +} + sub guest_find_domid ($$) { my ($ho,$gho) = @_; return if defined $gho->{Domid}; diff --git a/ts-host-install b/ts-host-install index 299eae48..9f9c84fd 100755 --- a/ts-host-install +++ b/ts-host-install @@ -253,7 +253,7 @@ END push @initrds, "$initrd_overlay.cpio.gz"; logm("using initrds: @initrds"); - my $initrd= "$ho->{Tftp}{TmpDir}".hostnamepath($ho)."--initrd.gz"; + my $initrd= target_tftp_prefix($ho) . "--initrd.gz"; system_checked("cat -- @initrds >$ho->{Tftp}{Path}$initrd"); push @dicmdline, "domain=$c{TestHostDomain}";