From patchwork Mon Jul 24 11:07:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roger Pau Monne X-Patchwork-Id: 9859273 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 1B1D8600F5 for ; Mon, 24 Jul 2017 11:14:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E4C5274B4 for ; Mon, 24 Jul 2017 11:14:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 032AA2856D; Mon, 24 Jul 2017 11:14:50 +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 2157B274B4 for ; Mon, 24 Jul 2017 11:14:46 +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 1dZbHL-0004dw-6p; Mon, 24 Jul 2017 11:11:59 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZbHK-0004dJ-6d for xen-devel@lists.xenproject.org; Mon, 24 Jul 2017 11:11:58 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id A2/C9-01732-DF5D5795; Mon, 24 Jul 2017 11:11:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsXitHSDve6fq6W RBleumFt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkbl8QUdPFV/D32jqWB8QtXFyMnh4SAv8Ti BzPZQWw2AR2Ji3N3snUxcnCICKhI3N5rABJmFgiRaD32BaxEGKh855VHbCA2i4CqxIRZS1hAy nkFLCQWboqAmKgn8XbiC0YQm1PAUqLv1ERmEFsIqOTo72NgNq+AoMTJmU9YIMZrSrRu/80OYc tLNG+dDVWvKNE/7wHbBEa+WUhaZiFpmYWkZQEj8ypG9eLUorLUIl0LvaSizPSMktzEzBxdQwN jvdzU4uLE9NScxKRiveT83E2MwCBjAIIdjBfanQ8xSnIwKYnyLl9XFCnEl5SfUpmRWJwRX1Sa k1p8iFGGg0NJglcPGLRCgkWp6akVaZk5wHCHSUtw8CiJ8LaApHmLCxJzizPTIVKnGHU5Xk34/ 41JiCUvPy9VSpxXCKRIAKQoozQPbgQs9i4xykoJ8zICHSXEU5BalJtZgir/ilGcg1FJmPfNFa ApPJl5JXCbXgEdwQR0xJwZYEeUJCKkpBoY8/8/ivGLVqnV86j+soU3SkA4g21BQp7eFO7/CYb XjufWnd22QrSj8P33LXNi/xxpnjV9ZVPtHrXXzlt7nsrzTvU+YsLg7n50t3Pt/3wp8+OLTOO3 syaW/V9QcEPq//mL6QlBYVIK34rEllySbNG1WflYY5na+zWKijJ9vom3Fk7rFKtPfm+txFKck WioxVxUnAgAhRpZxLgCAAA= X-Env-Sender: prvs=3717d8050=roger.pau@citrix.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1500894713!103582999!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 56568 invoked from network); 24 Jul 2017 11:11:56 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 24 Jul 2017 11:11:56 -0000 X-IronPort-AV: E=Sophos;i="5.40,406,1496102400"; d="scan'208";a="441030666" From: Roger Pau Monne To: Date: Mon, 24 Jul 2017 12:07:42 +0100 Message-ID: <20170724110759.2638-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170724110759.2638-1-roger.pau@citrix.com> References: <20170724110759.2638-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v6 03/20] 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}";