Skip to contentSkip to conversation

Test rump kernels

PATCH New Ian Jackson 1 participant 14 messages May 16, 2014

lore
Share & tools
lore
#0 lore raw

cover Test rump kernels

This series builds rumpuser-xen and checks that the upstream demo program appears to function correctly. This will hopefully, when deployed, allow us to spot breakages in the upstream rumpkernel project's support for Xen.

01/13 TestSupport: Provide target_editfile 02/13 git_massage_url: Make idempotent
03/13 BuildSupport, ts-*-build: Remove some 04/13 BuildSupport: Provide some support for git 05/13 TestSupport: Break out target_jobdir 06/13 TestSupport: Break out
07/13 target_jobdir: Create the directory 08/13 guest_umount_lv: Tolerate lack of volume group 09/13 prepareguest: Tolerate $mb=undef
10/13 mfi-common: Honour REVISION_LIBVIRT=disable 11/13 rump kernels: Provide a build job 12/13 rump kernels: Provide two test jobs 13/13 rump kernels: Create a "branch" for rump

I'm about to set off a test of this with cr-daily-branch from my own account on the osstest VM.

Thanks,
Ian.

#1 lore raw

PATCH 1/13 TestSupport: Provide target_editfile

... as well as target_editfile_root. No callers yet.

---
 Osstest/TestSupport.pm |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Osstest/TestSupport.pm +9 -3
index 6558fc8..c95807a 100644
@@ -54,7 +54,7 @@ BEGIN {
                       target_putfile target_putfile_root
                       target_putfilecontents_stash
 		      target_putfilecontents_root_stash
-                      target_put_guest_image
+                      target_put_guest_image target_editfile
                       target_editfile_root target_file_exists
                       target_run_apt
                       target_install_packages target_install_packages_norec
@@ -479,7 +479,8 @@ sub target_file_exists ($$) {
     die "$rfile $out ?";
 }
 
-sub target_editfile_root ($$$;$$) {
+sub teditfileex {
+    my $user= shift @_;
     my $code= pop @_;
     my ($ho,$rfile,$lleaf,$rdest) = @_;
 
@@ -512,9 +513,14 @@ sub target_editfile_root ($$$;$$) {
     '::EI'->error and die $!;
     close '::EI' or die $!;
     close '::EO' or die $!;
-    target_putfile_root($ho, 60, "$lfile.new", $rdest);
+    tputfileex($user, $ho, 60, "$lfile.new", $rdest);
 }
 
+sub target_editfile_root ($$$;$$) { teditfileex('root',@_); }
+sub target_editfile      ($$$;$$) { teditfileex('osstest',@_); }
+    # my $code= pop @_;
+    # my ($ho,$rfile,$lleaf,$rdest) = @_;
+
 sub target_cmd_build ($$$$) {
     my ($ho,$timeout,$builddir,$script) = @_;
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/13 git_massage_url: Make idempotent

In reply to Ian Jackson

If called more than once, it should not produce a url starting with multiple copies of the git cache proxy prefix.

---
 Osstest/TestSupport.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +2 -1
index c95807a..1492d9f 100644
@@ -1028,7 +1028,8 @@ sub file_simple_write_contents ($$) {
 sub git_massage_url ($) {
     my ($url) = @_;
 
-    if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy}) {
+    if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy} &&
+	substr($url,0,length($c{GitCacheProxy})) ne $c{GitCacheProxy}) {
 	$url = $c{GitCacheProxy}.$url;
     }
     return $url;
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/13 BuildSupport, ts-*-build: Remove some clone-and-hack

In reply to Ian Jackson

Introduce Osstest::BuildSupport containing selectbuildhost, builddirsprops and prepbuilddirs. The corresponding replicated code from the various ts-*-build scripts is abolished.

Also break out xendist, which we are going to want to reuse.

No functional change.

---
 Osstest/BuildSupport.pm |   93 +++++++++++++++++++++++++++++++++++++++++++++++
 ts-kernel-build         |   15 ++------
 ts-libvirt-build        |   22 +++--------
 ts-xen-build            |   15 ++------
 4 files changed, 106 insertions(+), 39 deletions(-)
 create mode 100644 Osstest/BuildSupport.pm
Osstest/BuildSupport.pm new file +93 -0
new file mode 100644
index 0000000..1b15557
@@ -0,0 +1,93 @@
+# 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/>.
+
+
+package Osstest::BuildSupport;
+
+use strict;
+use warnings;
+
+use POSIX;
+use IO::File;
+
+use Osstest::TestSupport;
+
+BEGIN {
+    use Exporter ();
+    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+    $VERSION     = 1.00;
+    @ISA         = qw(Exporter);
+    @EXPORT      = qw(
+
+                      selectbuildhost
+                      $whhost $ho
+
+                      builddirsprops
+                      $builddir $makeflags
+
+                      prepbuilddirs
+
+                      xendist
+                      $xendist
+
+                      );
+    %EXPORT_TAGS = ( );
+
+    @EXPORT_OK   = qw();
+}
+
+our ($whhost,$ho);
+our ($builddir,$makeflags);
+our ($xendist);
+
+sub selectbuildhost {
+    # pass @ARGV
+    ($whhost) = @_;
+    $whhost ||= 'host';
+    $ho= selecthost($whhost);
+}
+
+sub builddirsprops {
+    my (%xbuildopts) = @_;
+
+    $xbuildopts{DefMakeFlags} ||= '-j4';
+
+    my $leaf= "build.$flight.$job";
+    my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
+    $builddir= "$homedir/$leaf";
+
+    $makeflags= get_host_property($ho, 'build make flags',
+				  $xbuildopts{DefMakeFlags});
+}
+
+sub prepbuilddirs {
+    my (@xbuilddirs) = @_;
+    my $cmd = "rm -rf $builddir && mkdir $builddir";
+    $cmd .= " && mkdir $builddir/$_" foreach @xbuilddirs;
+    target_cmd($ho,$cmd,600);
+}
+
+sub xendist () {
+    $xendist= "$builddir/xendist";
+    target_cmd($ho,"rm -rf $xendist && mkdir $xendist",60);
+
+    my $path = get_stashed("path_dist", $r{"buildjob"});
+    my $distcopy= "$builddir/dist.tar.gz";
+    target_putfile($ho, 300, $path, $distcopy);
+    target_cmd($ho, "tar -C $xendist -hzxf $distcopy", 300);
+}
+
+1;
ts-kernel-build +4 -11
index 9d890a7..984a935 100755
@@ -19,18 +19,11 @@ use strict qw(vars);
 use DBI;
 use Osstest;
 use Osstest::TestSupport;
+use Osstest::BuildSupport;
 
 tsreadconfig();
-
-our ($whhost) = @ARGV;
-$whhost ||= 'host';
-our $ho= selecthost($whhost);
-
-my $leaf= "build.$flight.$job";
-my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
-my $builddir= "$homedir/$leaf";
-
-my $makeflags= get_host_property($ho, 'build make flags', '-j4');
+selectbuildhost(@ARGV);
+builddirsprops();
 
 my $archparms = {
     'armhf' => { DefConfig => 'multi_v7_defconfig', KernelImage => 'arch/arm/boot/zImage' },
@@ -41,7 +34,7 @@ my $archparms = {
 sub enable_xen_config ();
 
 sub checkout () {
-    target_cmd($ho, "rm -rf $builddir && mkdir $builddir", 600);
+    prepbuilddirs();
 
     build_clone($ho, 'linux', $builddir, 'linux');
 
ts-libvirt-build +5 -17
index 9c731ce..ffef714 100755
@@ -19,29 +19,17 @@ use strict qw(vars);
 use DBI;
 use Osstest;
 use Osstest::TestSupport;
+use Osstest::BuildSupport;
 
 tsreadconfig();
-
-our ($whhost) = @ARGV;
-$whhost ||= 'host';
-our $ho= selecthost($whhost);
-
-my $leaf= "build.$flight.$job";
-my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
-my $builddir= "$homedir/$leaf";
-my $xendist= "$builddir/xendist";
+selectbuildhost(@ARGV);
+builddirsprops();
 
 sub libvirtd_init ();
 
-my $makeflags= get_host_property($ho, 'build make flags', '-j4');
-
 sub checkout () {
-    target_cmd($ho, "rm -rf $builddir && mkdir $builddir && mkdir $xendist", 600);
-
-    my $path = get_stashed("path_dist", $r{"buildjob"});
-    my $distcopy= "$builddir/dist.tar.gz";
-    target_putfile($ho, 300, $path, $distcopy);
-    target_cmd($ho, "tar -C $xendist -hzxf $distcopy", 300);
+    prepbuilddirs();
+    xendist();
 
     build_clone($ho, 'libvirt', $builddir, 'libvirt');
     build_clone($ho, 'gnulib_libvirt', $builddir, 'gnulib-libvirt');
ts-xen-build +4 -11
index 7ac46ea..d251e16 100755
@@ -21,21 +21,14 @@ use Osstest;
 use File::Path;
 use POSIX;
 use Osstest::TestSupport;
+use Osstest::BuildSupport;
 
 tsreadconfig();
-
-our ($whhost) = @ARGV;
-$whhost ||= 'host';
-our $ho= selecthost($whhost);
-
-my $leaf= "build.$flight.$job";
-my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
-my $builddir= "$homedir/$leaf";
-
-my $makeflags= get_host_property($ho, 'build make flags', '-j4');
+selectbuildhost(@ARGV);
+builddirsprops();
     
 sub checkout () {
-    target_cmd($ho, "rm -rf $builddir && mkdir $builddir", 60);
+    prepbuilddirs();
 
     build_clone($ho, 'xen', $builddir, 'xen-unstable');
 
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 4/13 BuildSupport: Provide some support for git submodules

In reply to Ian Jackson

* Provide a new "submodulefixup" function which, given a cloned tree which has submodules:
- massages the .gitmodules file according to the tree_* runvars and massage_url
- arranges for the submodules to be fetched and checked out
- stores the revisions of the submodules, as necessary
- honours any revision_ tags for the submodules
- allows the caller to give the submodules names which are suitable for use in runvars etc. (and might differ from the names or paths used in the supermodule)

* In a submodule, .git is actually a file containing a reference to a subdirectory of the main git tree. Cope with that.

---
 Osstest/BuildSupport.pm |   60 +++++++++++++++++++++++++++++++++++++++++++++++
 Osstest/TestSupport.pm  |    2 +-
 2 files changed, 61 insertions(+), 1 deletion(-)
Osstest/BuildSupport.pm +60 -0
index 1b15557..9a43f00 100644
@@ -43,6 +43,8 @@ BEGIN {
                       xendist
                       $xendist
 
+                      submodulefixup
+
                       );
     %EXPORT_TAGS = ( );
 
@@ -90,4 +92,62 @@ sub xendist () {
     target_cmd($ho, "tar -C $xendist -hzxf $distcopy", 300);
 }
 
+#----- submodules -----
+
+sub submodulefixup ($$$$) {
+    my ($ho, $subdir, $basewhich, $submodmap) = @_;
+
+    my @submodules;
+    target_editfile($ho, "$builddir/$subdir/.gitmodules",
+		    "$subdir-gitmodules", sub {
+        my $submod;
+	my $log1 = sub { logm("submodule $submod->{OurName} @_"); };
+        while (<::EI>) {
+	    if (m/^\[submodule \"(.*)\"\]$/) {
+		$submod = { TheirName => $1 },
+		push @submodules, $submod;
+		my $mapped = $submodmap->{$1};
+		die "unknown submodule $1" unless defined $mapped;
+		$submod->{OurName} = $mapped;
+		$log1->("($submod->{TheirName}):");
+	    } elsif (m/^\s*path\s*=\s*(\S+)/) {
+		die unless $submod;
+		$submod->{Path} = $1;
+		$log1->("  subpath=$submod->{Path}");
+	    } elsif (m/^(\s*url\s*\=\s*)(\S+)/) {
+		die unless $submod;
+		my $l = $1;
+		my $u = $submod->{OrgUrl} = $2;
+		my $urv = "tree_${basewhich}_$submod->{OurName}";
+		if (length $r{$urv}) {
+		    $log1->("  overriding url=$u with runvar $urv=$r{$urv}");
+		    $u = $r{$urv};
+		} else {
+		    $log1->("  recording url=$u");
+		    store_runvar($urv, $u);
+		}
+		my $nu = $submod->{Url} = git_massage_url($u);
+		$_ = "${l}${nu}\n";
+	    }
+	    print ::EO or die $!;
+	}
+    });
+
+    target_cmd_build($ho,  60,"$builddir/$subdir","git submodule init");
+    target_cmd_build($ho,3600,"$builddir/$subdir","git submodule update");
+
+    foreach my $submod (@submodules) {
+	my $wantrev = $r{"revision_${basewhich}_$submod->{OurName}"};
+	if (length $wantrev) {
+	    target_cmd_build($ho,200,"$builddir/$subdir/$submod->{Path}",
+			     "git reset --hard $wantrev");
+	} else {
+	    store_revision($ho, "${basewhich}_$submod->{OurName}",
+			   "$builddir/$subdir/$submod->{Path}");
+	}
+    }
+
+    return \@submodules;
+}
+
 1;
Osstest/TestSupport.pm +1 -1
index 1492d9f..49bb175 100644
@@ -1087,7 +1087,7 @@ sub dir_identify_vcs ($$) {
         set -e
         if ! test -e $dir; then echo none; exit 0; fi
         cd $dir
-        (test -d .git && echo git) ||
+        (test -e .git && echo git) ||
         (test -d .hg && echo hg) ||
         (echo >&2 'unable to determine vcs'; fail)
 END
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH 5/13 TestSupport: Break out target_jobdir

In reply to Ian Jackson

No functional change.

---
 Osstest/BuildSupport.pm |    6 +-----
 Osstest/TestSupport.pm  |    8 ++++++++
 2 files changed, 9 insertions(+), 5 deletions(-)
Osstest/BuildSupport.pm +1 -5
index 9a43f00..d5fb677 100644
@@ -66,11 +66,7 @@ sub builddirsprops {
     my (%xbuildopts) = @_;
 
     $xbuildopts{DefMakeFlags} ||= '-j4';
-
-    my $leaf= "build.$flight.$job";
-    my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
-    $builddir= "$homedir/$leaf";
-
+    $builddir= target_jobdir($ho);
     $makeflags= get_host_property($ho, 'build make flags',
 				  $xbuildopts{DefMakeFlags});
 }
Osstest/TestSupport.pm +8 -0
index 49bb175..96454d3 100644
@@ -58,6 +58,7 @@ BEGIN {
                       target_editfile_root target_file_exists
                       target_run_apt
                       target_install_packages target_install_packages_norec
+                      target_jobdir
                       target_extract_jobdistpath target_guest_lv_name
 
                       poll_loop tcpconnect await_tcp
@@ -1706,6 +1707,13 @@ END
     return $console;
 }
 
+sub target_jobdir ($) {
+    my ($ho) = @_;
+    my $leaf= "build.$flight.$job";
+    my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
+    return "$homedir/$leaf";
+}
+
 sub target_extract_jobdistpath ($$$$$) {
     my ($ho, $part, $path, $job, $distpath) = @_;
     $distpath->{$part}= get_stashed($path, $job);
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 6/13 TestSupport: Break out target_extract_jobdistpath_subdir

In reply to Ian Jackson

This is the meat of what was Osstest::BuildSupport::xendist, which now becomes a simple convenience wrapper.

No functional change.

---
 Osstest/BuildSupport.pm |    9 ++-------
 Osstest/TestSupport.pm  |   20 +++++++++++++++++++-
 2 files changed, 21 insertions(+), 8 deletions(-)
Osstest/BuildSupport.pm +2 -7
index d5fb677..bd79b4b 100644
@@ -79,13 +79,8 @@ sub prepbuilddirs {
 }
 
 sub xendist () {
-    $xendist= "$builddir/xendist";
-    target_cmd($ho,"rm -rf $xendist && mkdir $xendist",60);
-
-    my $path = get_stashed("path_dist", $r{"buildjob"});
-    my $distcopy= "$builddir/dist.tar.gz";
-    target_putfile($ho, 300, $path, $distcopy);
-    target_cmd($ho, "tar -C $xendist -hzxf $distcopy", 300);
+    $xendist = target_extract_jobdistpath_subdir
+	($ho, 'xendist', '', $r{"buildjob"});
 }
 
 #----- submodules -----
Osstest/TestSupport.pm +19 -1
index 96454d3..d72a02c 100644
@@ -58,7 +58,7 @@ BEGIN {
                       target_editfile_root target_file_exists
                       target_run_apt
                       target_install_packages target_install_packages_norec
-                      target_jobdir
+                      target_jobdir target_extract_jobdistpath_subdir
                       target_extract_jobdistpath target_guest_lv_name
 
                       poll_loop tcpconnect await_tcp
@@ -1714,6 +1714,24 @@ sub target_jobdir ($) {
     return "$homedir/$leaf";
 }
 
+sub target_extract_jobdistpath_subdir ($$$$) {
+    my ($ho, $subdir, $distpart, $buildjob) = @_;
+    # Extracts dist part $distpart from job $buildjob into an
+    # job-specific directory with leafname $subdir on $ho, and returns
+    # the directory's pathname.  Does not need root.
+
+    my $jobdir = target_jobdir($ho);
+    my $distdir = "$jobdir/$subdir";
+    target_cmd($ho,"rm -rf $distdir && mkdir $distdir",60);
+
+    my $path = get_stashed("path_${distpart}dist", $buildjob);
+    my $distcopy= "$jobdir/${subdir}.tar.gz";
+    target_putfile($ho, 300, $path, $distcopy);
+    target_cmd($ho, "tar -C $distdir -hzxf $distcopy", 300);
+
+    return $distdir;
+}
+
 sub target_extract_jobdistpath ($$$$$) {
     my ($ho, $part, $path, $job, $distpath) = @_;
     $distpath->{$part}= get_stashed($path, $job);
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 7/13 target_jobdir: Create the directory

In reply to Ian Jackson

Callers of target_jobdir can now rely on the directory existing after it returns.

---
 Osstest/TestSupport.pm |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
Osstest/TestSupport.pm +9 -3
index d72a02c..6dd0247 100644
@@ -1709,9 +1709,15 @@ END
 
 sub target_jobdir ($) {
     my ($ho) = @_;
-    my $leaf= "build.$flight.$job";
-    my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
-    return "$homedir/$leaf";
+    my $jobdir = $ho->{JobDir};
+    if (!$jobdir) {
+	my $leaf= "build.$flight.$job";
+	my $homedir = get_host_property($ho, 'homedir', '/home/osstest');
+	$jobdir = "$homedir/$leaf";
+	target_cmd($ho, "mkdir -p $jobdir", 60);
+	$ho->{JobDir} = $jobdir;
+    }
+    return $jobdir;
 }
 
 sub target_extract_jobdistpath_subdir ($$$$) {
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 8/13 guest_umount_lv: Tolerate lack of volume group

In reply to Ian Jackson

Check if the guest has a volume group, and if not do nothing.

We are going to introduce a kind of guest with no significant storage.

---
 Osstest/TestSupport.pm |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +3 -1
index 6dd0247..386008f 100644
@@ -1634,7 +1634,9 @@ sub target_umount_lv ($$$) {
 
 sub guest_umount_lv ($$) {
     my ($ho,$gho) = @_;
-    target_umount_lv($ho, $gho->{Vg}, $gho->{Lv});
+    if (defined $gho->{Vg}) {
+	target_umount_lv($ho, $gho->{Vg}, $gho->{Lv});
+    }
 }
 
 sub target_tcp_check ($$) {
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH 9/13 prepareguest: Tolerate $mb=undef

In reply to Ian Jackson

Allow callers to pass undef for $mb, to indicate that there is no need for prepareguest to do anything about storage.

No functional change for any of the existing callers.

---
 Osstest/TestSupport.pm |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
Osstest/TestSupport.pm +9 -4
index 386008f..a576b87 100644
@@ -1383,16 +1383,21 @@ sub prepareguest ($$$$$$) {
     }
 
     store_runvar("${gn}_hostname", $hostname);
-    store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk');
     store_runvar("${gn}_tcpcheckport", $tcpcheckport);
     store_runvar("${gn}_boot_timeout", $boot_timeout);
 
+    if (defined $mb) {
+	store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk');
+    }
+
     my $gho= selectguest($gn, $ho);
     store_runvar("${gn}_domname", $gho->{Name});
 
-    store_runvar("${gn}_vg", '');
-    if (!length $r{"${gn}_vg"}) {
-        store_runvar("${gn}_vg", target_choose_vg($ho, $mb));
+    if (defined $mb) {
+	store_runvar("${gn}_vg", '');
+	if (!length $r{"${gn}_vg"}) {
+	    store_runvar("${gn}_vg", target_choose_vg($ho, $mb));
+	}
     }
 
     guest_find_lv($gho);
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH 10/13 mfi-common: Honour REVISION_LIBVIRT=disable

In reply to Ian Jackson

This makes it possible for (for example) cr-daily-branch to disable the libvirt build, when it is not needed.

---
 mfi-common |    4 ++++
 1 file changed, 4 insertions(+)
mfi-common +4 -0
index 235575e..ae42637 100644
@@ -162,6 +162,8 @@ create_build_jobs () {
                 tree_linuxfirmware=$TREE_LINUXFIRMWARE                       \
                 revision_linuxfirmware=$REVISION_LINUXFIRMWARE
 
+    if [ "x$REVISION_LIBVIRT" != xdisable ]; then
+
     ./cs-job-create $flight build-$arch-libvirt build-libvirt                \
                 arch=$arch                                                   \
         tree_xen=$TREE_XEN                                                   \
@@ -174,6 +176,8 @@ create_build_jobs () {
                 tree_gnulib_libvirt=$TREE_GNULIB_LIBVIRT revision_gnulib_libvirt=$REVISION_GNULIB_LIBVIRT\
                 ${TREEVCS_GNULIB_LIBVIRT:+treevcs_gnulib_libvirt=}${TREEVCS_GNULIB_LIBVIRT}
 
+    fi
+
     case "$arch" in
     armhf) continue;; # don't do any other kernel builds
     esac
Signature · 1 line
1.7.10.4
#11 lore raw

PATCH 11/13 rump kernels: Provide a build job

In reply to Ian Jackson

Provide:
- test script ts-rumpuserxen-build
- recipe build-rumpuserxen
- in flights, job build-i386-rumpuserxen
- in ap-common, TREE and TREEVCS for RUMPUSERXEN and RUMPUSERXEN_RUMPSRC

mfi-common also honours REVISION_RUMPUSERXEN, but provides no way to specify the revisions of the subtrees (the two submodules and rumpsrc). The upstream rumpuser-xen git repository contains the commit hashes of those.

We had to do some pretty unpleasant things to get the rumpuser-xen build system to work with rumpsrc we cloned ourselves.

During bisection the bisector must choose a unification of the various trees' revision graphs, into a single graph. But we do not here teach adhoc-revtuple-generator about these interrelationships. As a result the bisector may choose a unification inconsistent with the subtree references in rumpuser-xen.git. This might impair the performance of the bisector in the presence of cross-tree version incompatibilities, but the results should be tolerable for now.

---
 ap-common            |    6 +++
 mfi-common           |   17 +++++++++
 sg-run-job           |    5 +++
 ts-rumpuserxen-build |  104 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 132 insertions(+)
 create mode 100755 ts-rumpuserxen-build
ap-common +6 -0
index 4cae650..d7933f1 100644
@@ -41,6 +41,12 @@
 : ${TREE_GNULIB_LIBVIRT:=git://git.sv.gnu.org/gnulib.git}
 : ${TREEVCS_GNULIB_LIBVIRT:=git}
 
+: ${TREE_RUMPUSERXEN:=https://github.com/rumpkernel/rumpuser-xen}
+: ${TREEVCS_RUMPUSERXEN:=git}
+
+: ${TREE_RUMPUSERXEN_RUMPSRC:=https://github.com/rumpkernel/rumpkernel-netbsd-src}
+: ${TREEVCS_RUMPUSERXEN_RUMPSRC:=git}
+
 : ${TREE_LINUXFIRMWARE:=git://xenbits.xen.org/osstest/linux-firmware.git}
 : ${PUSH_TREE_LINUXFIRMWARE:=$XENBITS:/home/osstest/ext/linux-firmware.git}
 : ${UPSTREAM_TREE_LINUXFIRMWARE:=$GIT_KERNEL_ORG/pub/scm/linux/kernel/git/firmware/linux-firmware.git}
mfi-common +17 -0
index ae42637..7c5f301 100644
@@ -178,6 +178,23 @@ create_build_jobs () {
 
     fi
 
+    case $arch in
+    i386)
+    ./cs-job-create $flight build-$arch-rumpuserxen build-rumpuserxen        \
+                arch=$arch                                                   \
+        tree_xen=$TREE_XEN                                                   \
+                $RUNVARS $BUILD_RUNVARS $BUILD_RUMPUSERXEN_RUNVARS $arch_runvars \
+                $suite_runvars                                               \
+                host_hostflags=$build_hostflags                              \
+                buildjob=${bfi}build-$arch                                   \
+                tree_rumpuserxen=$TREE_RUMPUSERXEN			\
+          ${TREEVCS_RUMPUSERXEN:+treevcs_rumpuserxen=}${TREEVCS_RUMPUSERXEN} \
+                revision_rumpuserxen=$REVISION_RUMPUSERXEN		\
+                tree_rumpuserxen_rumpsrc=$TREE_RUMPUSERXEN_RUMPSRC	\
+                ${TREEVCS_RUMPUSERXEN_RUMPSRC:+treevcs_rumpuserxen_rumpsrc=}${TREEVCS_RUMPUSERXEN_RUMPSRC}
+		;;
+    esac
+
     case "$arch" in
     armhf) continue;; # don't do any other kernel builds
     esac
sg-run-job +5 -0
index 3d44331..c71b84e 100755
@@ -313,6 +313,7 @@ proc test-guest-nomigr {g} {
 proc need-hosts/build {} { return BUILD }
 proc need-hosts/build-kern {} { return BUILD }
 proc need-hosts/build-libvirt {} { return BUILD }
+proc need-hosts/build-rumpuserxen {} { return BUILD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -326,6 +327,10 @@ proc run-job/build-libvirt {} {
     run-ts . = ts-libvirt-build
 }
 
+proc run-job/build-rumpuserxen {} {
+    run-ts . = ts-rumpuserxen-build
+}
+
 proc prepare-build-host {} {
     global jobinfo
     run-ts broken = ts-hosts-allocate + host
ts-rumpuserxen-build new file +104 -0

104 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#12 lore raw

PATCH 12/13 rump kernels: Provide two test jobs

In reply to Ian Jackson
---
 make-flight               |    8 +++++
 sg-run-job                |    8 +++++
 ts-rumpuserxen-demo-setup |   79 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 95 insertions(+)
 create mode 100755 ts-rumpuserxen-demo-setup
make-flight +8 -0
index aadf58b..5bac70e 100755
@@ -261,6 +261,14 @@ test_matrix_do_one () {
   *)               test_xend=n ;;
   esac
 
+  for rumparch in i386; do
+      job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
+                      test-rumpuserxen xl \
+            $xenarch $dom0arch                                       \
+            rump_rumpuserxenbuildjob=build-$rumparch-rumpuserxen     \
+            all_hostflags=$most_hostflags
+  done
+
   # xend PV guest test on x86 only
   if [ x$test_xend = xy -a \( $dom0arch = "i386" -o $dom0arch = "amd64" \) ]; then
     job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \
sg-run-job +8 -0
index c71b84e..8aa1422 100755
@@ -308,6 +308,14 @@ proc test-guest-nomigr {g} {
     run-ts . =   ts-guest-destroy + host $g
 }
 
+proc need-hosts/test-rumpuserxen {} { return host }
+proc run-job/test-rumpuserxen {} {
+    set g rump
+    run-ts . =   ts-rumpuserxen-demo-setup + host $g
+    run-ts . =   ts-guest-start            + host $g
+    run-ts . =   ts-guest-destroy          + host $g
+}
+
 #---------- builds ----------
 
 proc need-hosts/build {} { return BUILD }
ts-rumpuserxen-demo-setup new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#13 lore raw

PATCH 13/13 rump kernels: Create a "branch" for rump kernel tests

In reply to Ian Jackson

This is a traditional push gate.

---
 ap-common            |    3 +++
 ap-fetch-version     |    4 ++++
 ap-fetch-version-old |    5 +++++
 ap-print-url         |    3 +++
 ap-push              |    5 +++++
 cr-daily-branch      |   10 ++++++++++
 cri-common           |    1 +
 crontab              |    3 ++-
 make-flight          |    9 +++++++++
 mfi-common           |    1 +
 10 files changed, 43 insertions(+), 1 deletion(-)
ap-common +3 -0
index d7933f1..b7d03b5 100644
@@ -43,6 +43,8 @@
 
 : ${TREE_RUMPUSERXEN:=https://github.com/rumpkernel/rumpuser-xen}
 : ${TREEVCS_RUMPUSERXEN:=git}
+: ${BASE_TREE_RUMPUSERXEN:=git://xenbits.xen.org/rumpuser-xen.git}
+: ${PUSH_TREE_RUMPUSERXEN:=$XENBITS:/home/xen/git/rumpuser-xen.git}
 
 : ${TREE_RUMPUSERXEN_RUMPSRC:=https://github.com/rumpkernel/rumpkernel-netbsd-src}
 : ${TREEVCS_RUMPUSERXEN_RUMPSRC:=git}
@@ -72,6 +74,7 @@ fi
 : ${LOCALREV_LINUX:=daily-cron.$branch}
 : ${LOCALREV_LIBVIRT:=daily-cron.$branch}
 : ${LOCALREV_GNULIB_LIBVIRT:=daily-cron.$branch}
+: ${LOCALREV_RUMPUSERXEN:=daily-cron.$branch}
 
 : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
 
ap-fetch-version +4 -0
index 7cc2d98..c67fb2f 100755
@@ -77,6 +77,10 @@ gnulib-libvirt)
 	repo_tree_rev_fetch_git gnulib-libvirt \
 		$TREE_GNULIB_LIBVIRT master $LOCALREV_GNULIB_LIBVIRT
 	;;
+rumpuserxen)
+	repo_tree_rev_fetch_git rumpuserxen \
+		$TREE_RUMPUSERXEN master $LOCALREV_RUMPUSERXEN
+	;;
 osstest)
 	if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
 	    git fetch $HOME/testing.git pretest:ap-fetch >&2
ap-fetch-version-old +5 -0
index 3879e09..de88245 100755
@@ -28,6 +28,7 @@ select_xenbranch
 : ${BASE_TAG_LINUX2639:=tested/2.6.39.x}
 : ${BASE_LOCALREV_LINUX:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_LIBVIRT:=daily-cron.$branch.old}
+: ${BASE_LOCALREV_RUMPUSERXEN:=daily-cron.$branch.old}
 
 : ${BASE_TREE_QEMU_UPSTREAM:=${TREE_QEMU_UPSTREAM/\/staging\//\/}}
 
@@ -78,6 +79,10 @@ libvirt)
 	repo_tree_rev_fetch_git libvirt \
 		$BASE_TREE_LIBVIRT xen-tested-master $BASE_LOCALREV_LIBVIRT
 	;;
+rumpuserxen)
+	repo_tree_rev_fetch_git rumpuserxen \
+		$BASE_TREE_RUMPUSERXEN xen-tested-master $BASE_LOCALREV_RUMPUSERXEN
+	;;
 gnulib-libvirt)
 	# No push gate, same as ap-fetch-version
 	./ap-fetch-version $branch
ap-print-url +3 -0
index b1af0b9..8bcf396 100755
@@ -52,6 +52,9 @@ libvirt)
 gnulib-libvirt)
 	echo $TREE_GNULIB_LIBVIRT
 	;;
+rumpuserxen)
+	echo $TREE_RUMPUSERXEN
+	;;
 osstest)
 	echo none:;
 	;;
ap-push +5 -0
index 674559f..5c39b26 100755
@@ -33,6 +33,7 @@ TREE_LINUX=$PUSH_TREE_LINUX
 TREE_QEMU_UPSTREAM=$XENBITS:/home/xen/git/qemu-upstream-${xenbranch#xen-}.git
 TREE_XEN=$PUSH_TREE_XEN
 TREE_LIBVIRT=$PUSH_TREE_LIBVIRT
+TREE_RUMPUSERXEN=$PUSH_TREE_RUMPUSERXEN
 
 if info_linux_tree "$branch"; then
 	cd $repos/linux
@@ -77,6 +78,10 @@ libvirt)
 	cd $repos/libvirt
 	git push $TREE_LIBVIRT $revision:xen-tested-master
 	;;
+rumpuserxen)
+	cd $repos/rumpuserxen
+	git push $TREE_RUMPUSERXEN $revision:xen-tested-master
+	;;
 gnulib-libvirt)
 	# No gate
 	echo "gnulib-libvirt has not push gate, refusing to push" >&2
cr-daily-branch +10 -0
index 0cafe39..a7fe8db 100755
@@ -141,6 +141,10 @@ if [ "x$REVISION_GNULIB_LIBVIRT" = x ]; then
 	determine_version REVISION_GNULIB_LIBVIRT gnulib-libvirt
 	export REVISION_GNULIB_LIBVIRT
 fi
+if [ "x$REVISION_RUMPUSERXEN" = x ]; then
+	determine_version REVISION_RUMPUSERXEN rumpuserxen
+	export REVISION_RUMPUSERXEN
+fi
 if [ "x$REVISION_LINUXFIRMWARE" = x ]; then
 	determine_version REVISION_LINUXFIRMWARE linuxfirmware
         export REVISION_LINUXFIRMWARE
@@ -177,6 +181,12 @@ libvirt)
 	realtree=libvirt
 	NEW_REVISION=$REVISION_LIBVIRT
 	;;
+rumpuserxen)
+	realtree=rumpuserxen
+	NEW_REVISION=$REVISION_RUMPUSERXEN
+	export REVISION_LINUX_OLD=disable
+	export REVISION_LIBVIRT=disable
+	;;
 *)
 	NEW_REVISION=''
 	wantpush=false
cri-common +1 -0
index d82312c..cd9112c 100644
@@ -48,6 +48,7 @@ select_xenbranch () {
 	linux-*)		tree=linux;	xenbranch=xen-unstable ;;
 	linuxfirmware)	    tree=linuxfirmware;	xenbranch=xen-unstable ;;
 	libvirt)		tree=libvirt;	xenbranch=xen-unstable ;;
+	rumpuserxen)	      tree=rumpuserxen; xenbranch=xen-unstable ;;
 	osstest)		tree=osstest;	xenbranch=xen-unstable ;;
 	esac
 	if [ "x$tree" = xlinux ]; then
crontab +2 -1
index 002876a..f83bd78 100644
@@ -8,6 +8,7 @@ [email protected],[email protected]
 18		11	* * *		cd testing.git && BRANCHES=linux-mingo-tip-master ./cr-for-branches branches -w "./cr-daily-branch --real"
 18		12	* * *		cd testing.git && BRANCHES=linux-3.0		./cr-for-branches branches -w "./cr-daily-branch --real"
 18		13	* * *		cd testing.git && BRANCHES=libvirt		./cr-for-branches branches -w "./cr-daily-branch --real"
-6-59/15   	*	* * *		cd testing.git && EXTRA_BRANCHES='linux-linus linux-3.0' ./cr-for-branches bisects -w "./cr-try-bisect --real"
+18		14	* * *		cd testing.git && BRANCHES=rumpuserxen		./cr-for-branches branches -w "./cr-daily-branch --real"
+6-59/15   	*	* * *		cd testing.git && EXTRA_BRANCHES='linux-linus linux-3.0 rumpuserxen' ./cr-for-branches bisects -w "./cr-try-bisect --real"
 #8-59/5		*	* * *		cd bisects/adhoc.git &&	with-lock-ex -q data-tree-lock bash -c "./cr-try-bisect-adhoc; exit $?"
 3		5	* * *		savelog -c28 testing.git/tmp/cr-for-branches.log >/dev/null
make-flight +9 -0
index 5bac70e..dd679e8 100755
@@ -67,6 +67,15 @@ job_create_test_filter_callback () {
     libvirt)
       if [ x$toolstack != xlibvirt ] ; then return 1; fi
       ;;
+    rumpuserxen)
+      case "$job" in
+      *-rumpuserxen-*)
+          ;;
+      *)
+          : "suppressed $job"
+          return 1;;
+      esac
+      ;;
     *)
       case "$job" in
         *-qemuu-*)
mfi-common +1 -0
index 7c5f301..ff3c57e 100644
@@ -52,6 +52,7 @@ create_build_jobs () {
       linux-mingo-tip-master) continue;;
       linux-*) ;;
       qemu-*) continue;;
+      rumpuserxen) continue;;
       esac
       case "$xenbranch" in
       xen-3.*-testing) continue;;
Signature · 1 line
1.7.10.4