From patchwork Fri Jan 8 14:29:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 7986921 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 BD71F9F38D for ; Fri, 8 Jan 2016 14:33:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BACAA201EC for ; Fri, 8 Jan 2016 14:33:13 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A52D220149 for ; Fri, 8 Jan 2016 14:33:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHY3T-0004pR-Ie; Fri, 08 Jan 2016 14:30:15 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHY3S-0004oT-4e for xen-devel@lists.xen.org; Fri, 08 Jan 2016 14:30:14 +0000 Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id E3/4F-25438-5F7CF865; Fri, 08 Jan 2016 14:30:13 +0000 X-Env-Sender: prvs=80839a509=Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1452263405!13575267!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3786 invoked from network); 8 Jan 2016 14:30:09 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jan 2016 14:30:09 -0000 X-IronPort-AV: E=Sophos;i="5.20,538,1444694400"; d="scan'208";a="323696128" From: Ian Campbell To: , Date: Fri, 8 Jan 2016 14:29:52 +0000 Message-ID: <1452263399-14094-5-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1452263368.29416.39.camel@citrix.com> References: <1452263368.29416.39.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell Subject: [Xen-devel] [PATCH RFC OSSTEST v1 05/12] make-*flight: Abolish $defsuite and $guestdefsuite X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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 Instead have mfi-common set $suite or $guestsuite if it is unset. When doing so move the use of local to this point, using local at the top of the function would shadow any attempt to set a global value, while restricting it only to when setting the default means it doesn't leak. NB "local" scopes the variable to the containing function, not the scope of the block where it is written (i.e. the if body in this case). This adds an explicit debian_suite to some jobs which didn't already have one, meaning that those jobs will remain the same when cloned for a bisect and run in a tree where $c{DebianGuestSuite} has changed since the original construction. No expected semantic change. Signed-off-by: Ian Campbell --- The use of local in the first paragraph seems a bit "icky". Using local suite=$suite at the top of the function might be a less gross alternative? @@ -444,13 +444,42 @@ xen-unstable test-amd64-amd64-xl-pvh-intel debian_pvh 1 xen-unstable test-amd64-amd64-amd64-pvgrub debian_suite jessie xen-unstable test-amd64-amd64-i386-pvgrub debian_suite jessie +xen-unstable test-amd64-amd64-libvirt debian_suite jessie +xen-unstable test-amd64-amd64-libvirt-pair debian_suite jessie xen-unstable test-amd64-amd64-libvirt-vhd debian_suite jessie +xen-unstable test-amd64-amd64-libvirt-xsm debian_suite jessie +xen-unstable test-amd64-amd64-migrupgrade debian_suite jessie +xen-unstable test-amd64-amd64-pair debian_suite jessie xen-unstable test-amd64-amd64-pygrub debian_suite jessie +xen-unstable test-amd64-amd64-xl debian_suite jessie +xen-unstable test-amd64-amd64-xl-credit2 debian_suite jessie +xen-unstable test-amd64-amd64-xl-multivcpu debian_suite jessie +xen-unstable test-amd64-amd64-xl-pvh-amd debian_suite jessie +xen-unstable test-amd64-amd64-xl-pvh-intel debian_suite jessie xen-unstable test-amd64-amd64-xl-qcow2 debian_suite jessie +xen-unstable test-amd64-amd64-xl-rtds debian_suite jessie +xen-unstable test-amd64-amd64-xl-xsm debian_suite jessie +xen-unstable test-amd64-i386-libvirt debian_suite jessie +xen-unstable test-amd64-i386-libvirt-pair debian_suite jessie +xen-unstable test-amd64-i386-libvirt-xsm debian_suite jessie +xen-unstable test-amd64-i386-migrupgrade debian_suite jessie +xen-unstable test-amd64-i386-pair debian_suite jessie +xen-unstable test-amd64-i386-xl debian_suite jessie xen-unstable test-amd64-i386-xl-raw debian_suite jessie +xen-unstable test-amd64-i386-xl-xsm debian_suite jessie +xen-unstable test-armhf-armhf-libvirt debian_suite jessie xen-unstable test-armhf-armhf-libvirt-qcow2 debian_suite jessie xen-unstable test-armhf-armhf-libvirt-raw debian_suite jessie +xen-unstable test-armhf-armhf-libvirt-xsm debian_suite jessie +xen-unstable test-armhf-armhf-xl debian_suite jessie +xen-unstable test-armhf-armhf-xl-arndale debian_suite jessie +xen-unstable test-armhf-armhf-xl-credit2 debian_suite jessie +xen-unstable test-armhf-armhf-xl-cubietruck debian_suite jessie +xen-unstable test-armhf-armhf-xl-midway debian_suite jessie +xen-unstable test-armhf-armhf-xl-multivcpu debian_suite jessie +xen-unstable test-armhf-armhf-xl-rtds debian_suite jessie xen-unstable test-armhf-armhf-xl-vhd debian_suite jessie +xen-unstable test-armhf-armhf-xl-xsm debian_suite jessie xen-unstable test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm debianhvm_image debian-8.2.0-amd64-CD-1.iso xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64 debianhvm_image debian-8.2.0-amd64-CD-1.iso xen-unstable test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm debianhvm_image debian-8.2.0-amd64-CD-1.iso --- make-distros-flight | 3 --- make-flight | 3 --- mfi-common | 25 ++++++++++++++----------- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/make-distros-flight b/make-distros-flight index 9d04d3b..a11ce84 100755 --- a/make-distros-flight +++ b/make-distros-flight @@ -30,9 +30,6 @@ flight=`./cs-flight-create $blessing $branch` . ./ap-common . ./mfi-common -defsuite=`getconfig DebianSuite` -defguestsuite=`getconfig GuestDebianSuite` - case $branch in distros-debian-*) debian_suite=${branch#distros-debian-} ;; *) echo $branch >&2; exit 1 ;; diff --git a/make-flight b/make-flight index 6b2b3ea..50abf97 100755 --- a/make-flight +++ b/make-flight @@ -31,9 +31,6 @@ flight=`./cs-flight-create $blessing $branch` . ./ap-common . ./mfi-common -defsuite=`getconfig DebianSuite` -defguestsuite=`getconfig GuestDebianSuite` - case "$branch" in xen-unstable-smoke) global_runvars+=" hostalloc_maxbonus_variation~=0 " diff --git a/mfi-common b/mfi-common index 0e2b64f..44e7b3e 100644 --- a/mfi-common +++ b/mfi-common @@ -80,7 +80,7 @@ create_build_jobs () { local arch local pvops_kernel pvops_kconfig_overrides - local suite hostos_runvars + local hostos_runvars local want_xend build_defxend build_extraxend local enable_ovmf local build_hostflags @@ -119,9 +119,9 @@ create_build_jobs () { ;; esac - case "$arch" in - *) suite=$defsuite;; - esac + if [ -z "$suite" ] ; then + local suite=`getconfig DebianSuite` + fi hostos_runvars="all_host_suite=$suite" @@ -401,9 +401,12 @@ test_matrix_iterate () { ;; esac - case "$xenarch" in - *) suite=$defsuite; guestsuite=$defguestsuite;; - esac + if [ -z "$suite" ] ; then + local suite=`getconfig DebianSuite` + fi + if [ -z "$guestsuite" ] ; then + local guestsuite=`getconfig GuestDebianSuite` + fi hostos_runvars="all_host_suite=$suite" @@ -431,10 +434,10 @@ test_matrix_iterate () { arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\" " - debian_runvars="debian_kernkind=$kernkind debian_arch=$dom0arch" - if [ $guestsuite != $defguestsuite ] ; then - debian_runvars="$debian_runvars debian_suite=$guestsuite" - fi + debian_runvars="debian_kernkind=$kernkind \ + debian_arch=$dom0arch \ + debian_suite=$guestsuite \ + " most_hostflags="arch-$dom0arch,arch-xen-$xenarch,suite-$suite,purpose-test" if [ "x$min_linux_hostflag" != "x" ] ; then