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

Re: [Xen-devel] [PATCH/RFC OSSTEST] Debian PV netboot guest test



On Mon, 2013-11-25 at 14:44 +0000, Ian Campbell wrote:
> I've been working on this on the odd occasion, I think it mostly works,
> or it did last I tried which was a while back. I'm sure it is too hacky
> in places. My plan was to clean it up on the next test day.
> 
> I'm mostly just sending this for Wei's benefit since he is independently
> looking at adding Debian HVM guest tests for OVMF purposes.

FWIW I was planning to introduce a separate "distros" flight to osstest,
which would semiregularly test a bunch of distros (of which Debian
happens to just be the one I was interested in).

My lashed up skanky thinking here is appended..

Ian.

commit 15e5f1c85e3ccf8ca70aacb116401b9332256894
Author: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date:   Mon Nov 25 14:36:40 2013 +0000

    Make a distro flight for running di jobs.

diff --git a/make-distro-flight b/make-distro-flight
new file mode 100644
index 0000000..b02281d
--- /dev/null
+++ b/make-distro-flight
@@ -0,0 +1,201 @@
+#!/bin/bash
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+branch=$1
+xenbranch=$2
+blessing=$3
+buildflight=$4
+
+flight=`./cs-flight-create $blessing $branch`
+
+. ap-common
+. cri-common
+
+bfi=${buildflight}.
+
+stripy () {
+        local out_vn="$1"; shift
+        local out_0="$1"; shift
+        local out_1="$1"; shift
+        local out_val=0
+        local this_val
+        local this_cmp
+        while [ $# != 0 ]; do
+                this_val="$1"; shift
+                this_cmp="$1"; shift
+                if [ "x$this_val" = "x$this_cmp" ]; then
+                        out_val=$(( $out_val ^ 1 ))
+                fi
+        done
+        eval "$out_vn=\"\$out_$out_val\""
+}
+
+job_create_test () {
+       local job=$1; shift
+       local recipe=$1; shift
+       local toolstack=$1; shift
+
+        local job_md5=`echo "$job" | md5sum`
+        job_md5="${job_md5%  -}"
+
+        if [ "x$JOB_MD5_PATTERN" != x ]; then
+                case "$job_md5" in
+                $JOB_MD5_PATTERN)       ;;
+                *)                      return;;
+                esac
+        fi
+
+       case "$branch" in
+       qemu-upstream-*)
+               case " $* " in
+               *" device_model_version=qemu-xen "*)
+                       ;;
+               *)
+                       : "suppressed $job"
+                       return;;
+               esac
+               ;;
+       *)
+               case "$job" in
+               *-qemuu-*)
+                  if [ "x$toolstack" != xxl ]; then return; fi
+
+                  case "$job" in
+                  *-win*)
+                             case "$job_md5" in
+                             *[0-a]) return;;
+                             esac
+                             ;;
+                  esac
+                  ;;
+               esac
+               ;;
+        esac
+
+       ./cs-job-create $flight $job $recipe toolstack=$toolstack \
+               $RUNVARS $TEST_RUNVARS $most_runvars "$@"
+}
+
+for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
+
+  if [ "x$xenarch" = xdisable ]; then continue; fi
+
+  case "$xenarch" in
+  armhf)
+       # Arm from 4.3 onwards only
+       case "$xenbranch" in
+       xen-3.*-testing) continue;;
+       xen-4.0-testing) continue;;
+       xen-4.1-testing) continue;;
+       xen-4.2-testing) continue;;
+       *) ;;
+       esac
+       ;;
+  i386)
+       # 32-bit Xen is dropped from 4.3 onwards
+       case "$xenbranch" in
+       xen-3.*-testing) ;;
+       xen-4.0-testing) ;;
+       xen-4.1-testing) ;;
+       xen-4.2-testing) ;;
+       *) continue ;;
+       esac
+       ;;
+  amd64)
+       ;;
+  esac
+
+  case "$xenbranch" in
+  xen-3.*-testing)     onetoolstack=xend ;;
+  xen-4.0-testing)     onetoolstack=xend ;;
+  xen-4.1-testing)     onetoolstack=xend ;;
+  *)                   onetoolstack=xl ;;
+  esac
+
+  for kern in ''; do
+
+    case $kern in
+    '')
+                kernbuild=pvops
+               kernkind=pvops
+               ;;
+    -xcpkern)
+                kernbuild=xcpkern
+               kernkind=2627
+               if [ "x$REVISION_LINUX_XCP" = xdisable ]; then continue; fi
+               ;;
+    *)         echo >&2 "kernkind ?  $kern"; exit 1 ;;
+    esac
+
+    for dom0arch in i386 amd64 armhf; do
+
+      case ${xenarch}_${dom0arch} in
+         amd64_amd64) ;;
+         amd64_i386) ;;
+         i386_i386) ;;
+         armhf_armhf) ;;
+         *) continue ;;
+      esac
+
+      eval "
+         arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\"
+      "
+
+      if [ x$kern = x-xcpkern -a $dom0arch != i386 ]; then continue; fi
+
+      
most_hostflags="arch-$dom0arch,arch-xen-$xenarch,suite-$suite,purpose-test"
+
+      most_runvars="
+               arch=$dom0arch                                  \
+               xenbuildjob=${bfi}build-$xenarch                \
+               kernbuildjob=${bfi}build-$dom0arch-$kernbuild   \
+               buildjob=${bfi}build-$dom0arch                  \
+               kernkind=$kernkind                              \
+               $arch_runvars $suite_runvars
+               "
+
+      case ${xenarch} in
+         amd64) domUarches="amd64 i386";;
+         i386)  domUarches="";;
+         armhf) domUarches="armhf";;
+      esac
+
+      for domU in $domUarches ; do
+        for dist in squeeze wheezy jessie ; do
+         case $domU_$dist in
+         armhf_squeeze) continue;;
+         *) ;;
+         esac
+         job_create_test test-$xenarch$kern-$dom0arch-$domU-$dist-di 
test-debian-di xl \
+               xenbuildjob=${bfi}build-$xenarch                \
+               kernbuildjob=${bfi}build-$dom0arch-$kernbuild   \
+               buildjob=${bfi}build-$dom0arch                  \
+               debian_arch=$domU \
+               debian_dist=$dist \
+               all_hostflags=$most_hostflags
+        done
+      done
+    done
+  done
+
+done
+
+echo $flight
diff --git a/make-flight b/make-flight
index 95f8d53..a5d21af 100755
--- a/make-flight
+++ b/make-flight
@@ -329,29 +329,6 @@ for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
                kernkind=$kernkind                              \
                $arch_runvars $suite_runvars
                "
-
-      case ${xenarch} in
-         amd64) domUarches="amd64 i386";;
-         i386)  domUarches="";;
-         armhf) domUarches="armhf";;
-      esac
-
-      for domU in $domUarches ; do
-        for dist in squeeze wheezy jessie ; do
-         case $domU_$dist in
-         armhf_squeeze) continue;;
-         *) continue;;
-         esac
-         job_create_test test-$xenarch$kern-$dom0arch-$domU-di test-debian-di 
xl \
-               xenbuildjob=${bfi}build-$xenarch                \
-               kernbuildjob=${bfi}build-$dom0arch-$kernbuild   \
-               buildjob=${bfi}build-$dom0arch                  \
-               debian_arch=$domU \
-               debian_dist=$dist \
-               all_hostflags=$most_hostflags
-        done
-      done
-
       if [ $dom0arch = armhf ]; then
          job_create_test test-$xenarch$kern-$dom0arch-xl test-debian xl \
                debian_kernkind=$kernkind                                 \
diff --git a/sg-report-flight b/sg-report-flight
index 69ef252..65733d1 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -95,7 +95,9 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
 @ARGV==1 or die;
 
 $_= shift @ARGV;
-if (m/^\d+$/) {
+if(m/^standalone.*$/) {
+    $specflight= $_;
+} elsif (m/^\d+$/) {
     $specflight= $_;
 } else {
     $branch= $_;
@@ -282,12 +284,12 @@ sub examineflight ($) {
 
     my $flightinfo= $dbh_tests->selectrow_hashref(<<END);
         SELECT * FROM flights
-            WHERE flight=$flight
+            WHERE flight="$flight"
 END
 
     my $jobs= $dbh_tests->selectall_arrayref(<<END, { Slice => {} });
         SELECT * FROM jobs
-            WHERE flight=$flight
+            WHERE flight="$flight"
 END
 
     my $colmap= sub {
@@ -303,7 +305,7 @@ END
 
     my $stepsq= $dbh_tests->prepare(<<END);
         SELECT * FROM steps
-            WHERE flight=$flight AND job=?
+            WHERE flight="$flight" AND job=?
             ORDER BY stepno
 END
 
@@ -425,7 +427,7 @@ END
 
         my $revh= $dbh_tests->prepare(<<END);
             SELECT * FROM runvars
-                WHERE flight=$flight AND job='$j->{job}'
+                WHERE flight="$flight" AND job='$j->{job}'
                   AND name like 'built_revision_%'
                 ORDER BY name
 END
diff --git a/standalone-reset b/standalone-reset
index 8be7e86..b045dba 100755
--- a/standalone-reset
+++ b/standalone-reset
@@ -156,7 +156,10 @@ fi
 export BUILD_LVEXTEND_MAX
 
 OSSTEST_FLIGHT=$flight \
-./make-flight "$branch" "$xenbranch" play $buildflight >/dev/null
+mainflight=`./make-flight "$branch" "$xenbranch" play $buildflight` >/dev/null
+
+OSSTEST_FLIGHT=${flight:-standalone}-distros \
+./make-distro-flight distros "$xenbranch" play $mainflight >/dev/null
 
 #---------- done ----------
 



_______________________________________________
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®.