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

Re: [Xen-devel] [PATCH OSSTEST v6 9/9] mfi-common, make-flight: create XSM test jobs



On Wed, Feb 04, 2015 at 04:47:51PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH OSSTEST v6 9/9] mfi-common, make-flight: create XSM 
> test jobs"):
> > Duplicate Debian PV and HVM test jobs for XSM testing.
> 
> This looks pretty good.  I have one minor comment:
> 
> > +  xsm_suffix=""
> > +  for rv in $@ ; do
> > +      case $rv in
> > +          enable_xsm=true) xsm_suffix="-xsm";;
> > +      esac
> > +  done
> 
> You could write this as
> 
>    case " $* " in
>    *" enable_xsm=true "*) xsm_suffix="-xsm";;
>    esac
> 
> since we don't cope with runvar settings with spaces in anyway.
> 
> (If we did you'd have to write   "$@"   not just  $@   .)
> 
> Ian.

Here is the updated version:

---8<---
From 5b40b06a62ef51ad511e36bf6eb12f3e9e88a647 Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Mon, 2 Feb 2015 19:57:13 +0000
Subject: [PATCH OSSTEST v6] mfi-common, make-flight: create XSM test jobs
Cc: ian.campbell@xxxxxxxxxx, ian.jackson@xxxxxxxxxxxxx

Duplicate Debian PV and HVM test jobs for XSM testing.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Changes in v6:
1. Skip generating xsm job for different platforms.
2. Use "xsms".
3. Reformat some long lines.
---
 make-flight | 53 +++++++++++++++++++++++++++++++++++++++--------------
 mfi-common  | 10 ++++++++--
 2 files changed, 47 insertions(+), 16 deletions(-)

diff --git a/make-flight b/make-flight
index 0cb9b98..8ac3a87 100755
--- a/make-flight
+++ b/make-flight
@@ -207,27 +207,36 @@ do_hvm_win7_x64_tests () {
 do_hvm_debian_test_one () {
   testname=$1
   bios=$2
+  xsm=$3
+
   job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-$testname-amd64\
     test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \
+    enable_xsm=$xsm                             \
     debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
     bios=$bios \
     all_hostflags=$most_hostflags,hvm
 }
 
 do_hvm_debian_tests() {
+  xsms=$(xenbranch_xsm_variants)
+
   if [ $xenarch != amd64 ]; then
     return
   fi
 
   # QEMU upstream supports ovmf and seabios
   if [ "x$qemuu_suffix" == "x-qemuu" ]; then
-    do_hvm_debian_test_one ovmf ovmf
-    do_hvm_debian_test_one debianhvm seabios
+    do_hvm_debian_test_one ovmf ovmf false
+    for xsm in $xsms ; do
+      do_hvm_debian_test_one debianhvm seabios $xsm
+    done
   fi
 
   # QEMU traditional supports rombios
   if [ "x$qemuu_suffix" == "x-qemut" ]; then
-    do_hvm_debian_test_one debianhvm rombios
+    for xsm in $xsms ; do
+      do_hvm_debian_test_one debianhvm rombios $xsm
+    done
   fi
 }
 
@@ -299,19 +308,35 @@ do_passthrough_tests () {
 }
 
 do_pv_debian_tests () {
-  # Basic PV Linux test with xl
-  for platform in '' `getplatforms $xenarch` ; do
-    suffix=${platform:+-$platform}
-    hostflags=${most_hostflags}${platform:+,platform-$platform}
-
-    job_create_test test-$xenarch$kern-$dom0arch-xl$suffix test-debian xl \
-            $xenarch $dom0arch                                   \
-            $debian_runvars all_hostflags=$hostflags
+  xsms=$(xenbranch_xsm_variants)
+
+  for xsm in $xsms ; do
+    # Basic PV Linux test with xl
+    for platform in '' `getplatforms $xenarch` ; do
+
+      # xsm test is not platform specific
+      if [ x$xsm = xtrue -a x$platform != x ]; then
+          continue
+      fi
+
+      suffix=${platform:+-$platform}
+      hostflags=${most_hostflags}${platform:+,platform-$platform}
+
+      job_create_test test-$xenarch$kern-$dom0arch-xl$suffix   \
+                      test-debian xl                           \
+                      $xenarch $dom0arch                       \
+                      enable_xsm=$xsm                          \
+                      $debian_runvars all_hostflags=$hostflags
+    done
   done
 
-  job_create_test test-$xenarch$kern-$dom0arch-libvirt test-debian libvirt \
-            $xenarch $dom0arch                                       \
-            $debian_runvars all_hostflags=$most_hostflags
+  for xsm in $xsms ; do
+    job_create_test test-$xenarch$kern-$dom0arch-libvirt         \
+                    test-debian libvirt                          \
+                    $xenarch $dom0arch                           \
+                    enable_xsm=$xsm                              \
+                    $debian_runvars all_hostflags=$most_hostflags
+  done
 }
 
 test_matrix_do_one () {
diff --git a/mfi-common b/mfi-common
index ee4e635..a0603a2 100644
--- a/mfi-common
+++ b/mfi-common
@@ -271,8 +271,14 @@ job_create_test () {
   local xenarch=$1; shift
   local dom0arch=$1; shift
 
-  xenbuildjob="${bfi}build-$xenarch"
-  buildjob="${bfi}build-$dom0arch"
+  xsm_suffix=""
+  case " $* " in
+    *" enable_xsm=true "*) xsm_suffix="-xsm";
+  esac
+
+  job="$job$xsm_suffix"
+  xenbuildjob="${bfi}build-$xenarch$xsm_suffix"
+  buildjob="${bfi}build-$dom0arch$xsm_suffix"
   tsbuildjob=
 
   case "$xenbranch:$toolstack" in
-- 
1.9.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®.