From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 12/13] rump kernels: Provide two test jobs
Date: Fri, 16 May 2014 19:01:39 +0100 [thread overview]
Message-ID: <1400263300-22903-13-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com>
---
make-flight | 8 +++++
sg-run-job | 8 +++++
ts-rumpuserxen-demo-setup | 79 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 95 insertions(+)
create mode 100755 ts-rumpuserxen-demo-setup
diff --git a/make-flight b/make-flight
index aadf58b..5bac70e 100755
--- a/make-flight
+++ b/make-flight
@@ -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 \
diff --git a/sg-run-job b/sg-run-job
index c71b84e..8aa1422 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -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 }
diff --git a/ts-rumpuserxen-demo-setup b/ts-rumpuserxen-demo-setup
new file mode 100755
index 0000000..4ad77f8
--- /dev/null
+++ b/ts-rumpuserxen-demo-setup
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+# 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/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+our ($whhost,$gn) = @ARGV;
+$whhost ||= 'host';
+$gn ||= 'rump';
+
+our $ho= selecthost($whhost);
+
+our $gho;
+
+our $rkdist;
+
+sub prep () {
+ $gho = prepareguest($ho, $gn, $gn, 4096, undef, 30);
+
+ my $buildjob = guest_var($gho, 'rumpuserxenbuildjob', undef);
+ $rkdist = target_extract_jobdistpath_subdir
+ ($ho, 'rumpuserxen', 'rumpuserxen', $buildjob);
+ $rkdist .= '/usr/local/lib/xen/rump-kernel';
+
+ my @images;
+
+ my $jobdir = target_jobdir($ho);
+
+ my $cfgfile = "$gn.cfg";
+ my $cfgpath = "/etc/xen/$cfgfile";
+ target_editfile_root($ho, "$rkdist/domain_config", $cfgfile, $cfgpath,
+ sub {
+ while (<EI>) {
+ next if m/^\s*\#/;
+ next unless m/\S/;
+
+ my $in = $& if m/^\w\S*/;
+
+ s# = .* # " = '$gn'" #xe if $in eq 'name';
+ s# =\s* ['"](.*)['"] # " = '$rkdist/$1'" #xe if $in eq 'kernel';
+ s#\b mac=[0-9a-f:]+ # "mac=$gho->{Ether}" #xe if $in eq 'vif';
+ s#\b 4 \b# 3 #xe if $in eq 'extra';
+
+ if ($in eq 'disk') {
+ s{\b img/(\w+.ffs) \b}{
+ push @images, $1;
+ "$jobdir/$1";
+ }xeg;
+ }
+
+ print EO or die $!;
+ }
+ });
+
+ store_runvar("$gho->{Guest}_cfgpath", $cfgpath);
+
+ target_cmd($ho, "cp $rkdist/img/$_ $jobdir/$_", 200)
+ foreach @images;
+}
+
+prep();
--
1.7.10.4
next prev parent reply other threads:[~2014-05-16 18:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 18:01 [OSSTEST PATCH 00/13] Test rump kernels Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 01/13] TestSupport: Provide target_editfile Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 02/13] git_massage_url: Make idempotent Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 03/13] BuildSupport, ts-*-build: Remove some clone-and-hack Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 04/13] BuildSupport: Provide some support for git submodules Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 05/13] TestSupport: Break out target_jobdir Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 06/13] TestSupport: Break out target_extract_jobdistpath_subdir Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 07/13] target_jobdir: Create the directory Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 08/13] guest_umount_lv: Tolerate lack of volume group Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 09/13] prepareguest: Tolerate $mb=undef Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 10/13] mfi-common: Honour REVISION_LIBVIRT=disable Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 11/13] rump kernels: Provide a build job Ian Jackson
2014-05-16 18:01 ` Ian Jackson [this message]
2014-05-16 18:01 ` [OSSTEST PATCH 13/13] rump kernels: Create a "branch" for rump kernel tests 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=1400263300-22903-13-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.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).