[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC OSSTEST v1 05/12] make-*flight: Abolish $defsuite and $guestdefsuite



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@xxxxxxxxxx>
---
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.