xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH RFC OSSTEST v1 05/12] make-*flight: Abolish $defsuite and $guestdefsuite
Date: Fri, 8 Jan 2016 14:29:52 +0000	[thread overview]
Message-ID: <1452263399-14094-5-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1452263368.29416.39.camel@citrix.com>

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 <ian.campbell@citrix.com>
---
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
-- 
2.6.1

  parent reply	other threads:[~2016-01-08 14:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 14:29 [PATCH RFC OSSTEST v1 00/12] Specify host and guest os version in runvars Ian Campbell
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 01/12] Debian: Abolish $suite and $xopts{Suite} from preseed_* interfaces Ian Campbell
2016-01-08 15:08   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 02/12] target_var: Support fallback to all_(guest|host)_$vn Ian Campbell
2016-01-08 15:10   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 03/12] mfi-common: Rename $suite_runvars as $hostos_runvars Ian Campbell
2016-01-08 15:10   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 04/12] mfi-common: always add host suite to hostos_runvars Ian Campbell
2016-01-12 11:27   ` Ian Jackson
2016-01-08 14:29 ` Ian Campbell [this message]
2016-01-12 14:18   ` [PATCH RFC OSSTEST v1 05/12] make-*flight: Abolish $defsuite and $guestdefsuite Ian Jackson
2016-01-15 17:15     ` Ian Campbell
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 06/12] ts-host-install: Support DiVersion coming from runvars Ian Campbell
2016-01-12 14:19   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 07/12] ts-debian-di-install: Allow Di Version to come " Ian Campbell
2016-01-12 14:39   ` Ian Jackson
2016-01-15 16:33     ` Ian Campbell
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 08/12] make-flight: Set diversion runvar on d-i based test jobs Ian Campbell
2016-01-12 14:42   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 09/12] mfi-common: Set diversion for build & test host install Ian Campbell
2016-01-12 14:41   ` Ian Jackson
2016-01-15 17:36   ` Ian Campbell
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 10/12] Qualify TftpDiVersion with the suite Ian Campbell
2016-01-12 15:19   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 11/12] mfi-common: usual_debianhvm_image: derive version from $guestsuite Ian Campbell
2016-01-12 15:21   ` Ian Jackson
2016-01-08 14:29 ` [PATCH RFC OSSTEST v1 12/12] make-flight: Use older Debian for host and guest OS with older Xen Ian Campbell
2016-01-12 15:22   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452263399-14094-5-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).