From patchwork Fri Mar 18 17:09:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 8622401 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D26729F758 for ; Fri, 18 Mar 2016 17:12:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 171A72034B for ; Fri, 18 Mar 2016 17:12:08 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id E4DFA20303 for ; Fri, 18 Mar 2016 17:12:06 +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 1agxu4-0006nP-EA; Fri, 18 Mar 2016 17:09:36 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agxu2-0006kv-LT for xen-devel@lists.xenproject.org; Fri, 18 Mar 2016 17:09:34 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id 93/7D-17208-E463CE65; Fri, 18 Mar 2016 17:09:34 +0000 X-Env-Sender: prvs=8782d2786=Ian.Jackson@citrix.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1458320966!15631816!3 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: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37865 invoked from network); 18 Mar 2016 17:09:33 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 18 Mar 2016 17:09:33 -0000 X-IronPort-AV: E=Sophos;i="5.24,356,1454976000"; d="scan'208";a="346941239" From: Ian Jackson To: Date: Fri, 18 Mar 2016 17:09:15 +0000 Message-ID: <1458320955-2556-7-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1458320955-2556-1-git-send-email-ian.jackson@eu.citrix.com> References: <1458320955-2556-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 6/6] Various: Honour suite-specific TftpDiVersion 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace references to $c{TftpDiVersion} in the general osstest code with calls to cfg_tftp_di_version. This means that the suite-specific d-i version will, in general, be honoured (as is correct). In preseed_create, we also honour $ho->{DiVersion}. Often this won't be set, but it might be (for example, by selecthost finding di_version runvars). Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 5 +++-- Osstest/TestSupport.pm | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index f3c2f63..1e4900b 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1010,7 +1010,8 @@ sub preseed_create ($$;@) { my $suite= $ho->{Suite}; my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'. - $c{TftpDiVersion}.'-'.$ho->{Suite}; + ($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite})) + .'-'.$ho->{Suite}; preseed_hook_installscript($ho, $sfx, '/lib/partman/init.d', '000override-parted-devices', <{DiVersion} //= guest_var($gho,'di_version',undef); if (!$gho->{DiVersion}) { - $gho->{DiVersion} = $c{TftpDiVersion}; + $gho->{DiVersion} = cfg_tftp_di_version(debian_guest_suite($gho)); store_runvar("$gho->{Guest}_di_version", $gho->{DiVersion}); } diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 0b3e18a..572d657 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -862,7 +862,8 @@ sub selecthost ($) { }; if (defined $job) { $ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite}; - $ho->{DiVersion} = target_var($ho, "di_version") // $c{TftpDiVersion}; + $ho->{DiVersion} = target_var($ho, "di_version") + // cfg_tftp_di_version($ho->{Suite}); } #----- handle hosts which are themselves guests (nested) -----