All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH 00/16] Fix rump kernel tests
@ 2016-10-07 16:34 Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 01/16] rump-test-net: New test program Ian Jackson
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel

With these 16 patches, we complete osstest's adaptation to the modern
rumprun-based way of setting up and running rump kernel programs.

We replace the old networking test (based on the WOPR example, now
removed from rump upstream) with our own test program.  The net test
should start working right away.

The xenstore-ls test has been broken by bitrot in the rumprun tree.
It requires a corresponding rumprun patch series, which I am about to
feed as a pull request to rumprun upstream.

The longstanding low-probability scheduler lockup bug remains
outstanding.

Ian.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 01/16] rump-test-net: New test program
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 02/16] rump-test-net: setsockopt V6ONLY off Ian Jackson
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

The rump kernel WOPR test is no more, so we reimplement it.  This test
program simply listens on a TCP socket and says hi when you connect to
it.  It's a portable program.  So far, this has been tested on Linux,
but not in the rump environment.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 rump-test-net.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 rump-test-net.c

diff --git a/rump-test-net.c b/rump-test-net.c
new file mode 100644
index 0000000..96dbb1c
--- /dev/null
+++ b/rump-test-net.c
@@ -0,0 +1,65 @@
+/*
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/fcntl.h>
+
+static int master;
+
+int main(int argc, const char *const *argv) {
+    struct sockaddr_in6 sin6;
+    int r;
+
+    assert(argc==2);
+
+    master = socket(AF_INET6,SOCK_STREAM,0);
+    if (master<0) { perror("socket"); exit(-1); }
+
+    int port = atoi(argv[1]);
+
+    memset(&sin6,0,sizeof(sin6));
+    sin6.sin6_family = AF_INET6;
+    sin6.sin6_port = htons(port);
+    sin6.sin6_addr = in6addr_any;
+
+    r = bind(master,(struct sockaddr*)&sin6,sizeof(sin6));
+    if (r) { perror("bind"); exit(-1); }
+
+    r = listen(master,5);
+    if (r) { perror("listen"); exit(-1); }
+
+    fprintf(stderr,"listening on %d\n",port);
+
+    int slave = -1;
+    for (;;) {
+	static const char message[] = "hello\r\n";
+	static const int messagel = sizeof(message)-1;
+
+	if (slave > 0) close(slave);
+
+	slave = accept(master,0,0);
+	if (slave < 0) { perror("accept"); continue; }
+
+	r = fcntl(slave, F_GETFL);
+	if (r < 0) { perror("F_GETFL"); continue; }
+	r = fcntl(slave, F_SETFL, r | O_NONBLOCK);
+	if (r < 0) { perror("F_SETFL"); continue; }
+
+	r = write(slave, message, messagel);
+	if (r < 0) { perror("write"); continue; }
+	else if (r != messagel) {
+	    fprintf(stderr,"write: %d (!= %d",r,messagel);
+	    continue;
+	}
+
+	r = close(slave);
+	slave = -1;
+	if (r < 0) { perror("close"); continue; }
+    }
+}
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 02/16] rump-test-net: setsockopt V6ONLY off
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 01/16] rump-test-net: New test program Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 03/16] BuildSupport: builddirsprops: Clean up each builddir Ian Jackson
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

NetBSD (unlike Linux) has the V6ONLY socket option turned on by
default.  So to work in the rump kernel environment when tested with
IPv4 we need to adjust this setting.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 rump-test-net.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rump-test-net.c b/rump-test-net.c
index 96dbb1c..486a261 100644
--- a/rump-test-net.c
+++ b/rump-test-net.c
@@ -21,6 +21,10 @@ int main(int argc, const char *const *argv) {
     master = socket(AF_INET6,SOCK_STREAM,0);
     if (master<0) { perror("socket"); exit(-1); }
 
+    int no = 0;
+    r = setsockopt(master, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&no, sizeof(no));
+    if (r<0) { perror("IPV6_V6ONLY"); exit(-1); }
+
     int port = atoi(argv[1]);
 
     memset(&sin6,0,sizeof(sin6));
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 03/16] BuildSupport: builddirsprops: Clean up each builddir
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 01/16] rump-test-net: New test program Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 02/16] rump-test-net: setsockopt V6ONLY off Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 04/16] Support guest-specific "toolstack" for guest creation Ian Jackson
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This makes prepbuilddirs work if it is run a second time for the same
builddirs, which is useful for ad-hoc testing.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/BuildSupport.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index d005ca9..7e114cf 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -91,7 +91,8 @@ sub builddirsprops {
 sub prepbuilddirs {
     my (@xbuilddirs) = @_;
     my $cmd = "mkdir -p $builddir && rm -rf $builddir/*-stamp $builddir/dist";
-    $cmd .= " && mkdir $builddir/$_" foreach @xbuilddirs;
+    $cmd .= " && rm -rf $builddir/$_ && mkdir $builddir/$_"
+	foreach @xbuilddirs;
     target_cmd($ho,$cmd,600);
 }
 
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 04/16] Support guest-specific "toolstack" for guest creation
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (2 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 03/16] BuildSupport: builddirsprops: Clean up each builddir Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 05/16] rump kernels: Provide rumprun toolstack Ian Jackson
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Some guests need creation in a special way.  For example, rump kernels
are ideally started with rumprun.  Honour a guest var which specifies
a toolstack name.

Osstest::TestSupport::toolstack now takes an optional $gho so it can
do this lookup when appropriate.

After creation the guest is necessarily managed with the toolstack for
the host, so we honour this (ie we pass the $gho) only for create.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index b18a19e..bc3ad13 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1583,7 +1583,7 @@ sub guest_create ($) {
     my ($gho) = @_;
     my $ho = $gho->{Host};
     guest_prepare_disk($gho);
-    toolstack($ho)->create($gho);
+    toolstack($ho,$gho)->create($gho);
 }
 
 sub guest_prepare_disk ($) {
@@ -2257,13 +2257,16 @@ sub guest_vncsnapshot_stash ($$$$) {
     target_getfile_root($ho,100, "$rfile", "$stash/$leaf");
 }
 
-sub toolstack ($) {
-    my ($ho) = @_;
-    return $ho->{_Toolstack} if $ho->{_Toolstack};
+sub toolstack ($;$) {
+    my ($ho,$gho) = @_;
+
+    my $cache = $gho || $ho;
+    return $cache->{_Toolstack} if $cache->{_Toolstack};
 
     my $tsname= $r{toolstack} || 'xend';
-    $ho->{_Toolstack}= get_host_method_object($ho, 'Toolstack', $tsname);
-    return $ho->{_Toolstack};
+    $tsname= guest_var($gho, 'toolstack', $tsname) if $gho;
+    $cache->{_Toolstack} = get_host_method_object($ho, 'Toolstack', $tsname);
+    return $cache->{_Toolstack};
 }
 
 sub authorized_keys () {
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 05/16] rump kernels: Provide rumprun toolstack
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (3 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 04/16] Support guest-specific "toolstack" for guest creation Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 06/16] rump kernels: Specify toolstack for rumprun demo to be rumprun Ian Jackson
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This is suitable as a guest-specific toolstack: it defers to xl for
everything other than guest creation.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Toolstack/rumprun.pm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 Osstest/Toolstack/rumprun.pm

diff --git a/Osstest/Toolstack/rumprun.pm b/Osstest/Toolstack/rumprun.pm
new file mode 100644
index 0000000..74742c4
--- /dev/null
+++ b/Osstest/Toolstack/rumprun.pm
@@ -0,0 +1,33 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2014 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::Toolstack::rumprun;
+
+use strict;
+use warnings;
+
+use Osstest::RumpRun;
+
+# Defer to xl driver for most things
+use parent qw(Osstest::Toolstack::xl);
+
+sub create ($$) {
+    my ($self,$gho) = @_;
+    rumprun_guest_create($gho);
+}
+
+1;
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 06/16] rump kernels: Specify toolstack for rumprun demo to be rumprun
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (4 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 05/16] rump kernels: Provide rumprun toolstack Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 07/16] rump kernels: ts-rumprun-bake: Do not tolerate errors Ian Jackson
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This causes ts-guest-start to use rumprun, rather than xl.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-rumprun-demo-setup | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ts-rumprun-demo-setup b/ts-rumprun-demo-setup
index 212d758..b99c6f8 100755
--- a/ts-rumprun-demo-setup
+++ b/ts-rumprun-demo-setup
@@ -47,6 +47,7 @@ sub prep () {
     my $imagepath = $rkdist.'/'.$builtimage_subpath;
 
     store_runvar("${gn}_imagepath", $imagepath);
+    store_runvar("${gn}_toolstack", 'rumprun');
 }
 
 prep();
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 07/16] rump kernels: ts-rumprun-bake: Do not tolerate errors
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (5 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 06/16] rump kernels: Specify toolstack for rumprun demo to be rumprun Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 08/16] rump kernels: Provide proper DHCP instructions to rumprun Ian Jackson
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

If we skip due to missing the input pieces, make the warning noiser.

If we think we have all the input pieces, bomb out if they don't seem
to contain the right bits, or if rumpbake fails.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-rumprun-bake | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ts-rumprun-bake b/ts-rumprun-bake
index d79d6f8..31ce259 100755
--- a/ts-rumprun-bake
+++ b/ts-rumprun-bake
@@ -61,15 +61,14 @@ sub bakeimage ($$) {
 	    ($ho, "rumpbake-n-$name", $execpart, $buildjob || $job);
     };
     if ($@) {
-	warn "skipping: $@";
+	logm "*** WARNING: skipping $name: $@";
 	return;
     }
     my $execfile = $execdist.$execpath;
 
     target_cmd_build($ho, 1000, $imagesdir, <<END);
-        if test -f $execfile; then
-            $rumpbake xen_pv $name $execfile
-        fi
+        ls -al $execfile
+        $rumpbake xen_pv $name $execfile
 END
 }
 
@@ -81,9 +80,8 @@ while (@ARGV) {
     die unless @ARGV>=2;
     my $name = shift @ARGV;
     my $rumpexec = shift @ARGV;
-    eval {
-	bakeimage($name,$rumpexec);
-    };
+
+    bakeimage($name,$rumpexec);
 }
 
 stash();
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 08/16] rump kernels: Provide proper DHCP instructions to rumprun
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (6 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 07/16] rump kernels: ts-rumprun-bake: Do not tolerate errors Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 09/16] rump kernels: Provide networking test Ian Jackson
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Otherwise we just get an unconfigured network interface.  (Requesting
DHCP used to be implicit.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/RumpRun.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/RumpRun.pm b/Osstest/RumpRun.pm
index 0582bd2..f46d520 100644
--- a/Osstest/RumpRun.pm
+++ b/Osstest/RumpRun.pm
@@ -57,7 +57,8 @@ sub rumprun_guest_create ($) {
 
     my $cmd = "$rumprun xen";
     $cmd .= " -N $gn";
-    $cmd .= " -IIFTAG,IFBASENAME,mac=$gho->{Ether}";
+    $cmd .= " -I xenif0,xenif,mac=$gho->{Ether}";
+    $cmd .= " -W xenif0,inet,dhcp";
     $cmd .= " $imagepath";
     $cmd .= " $cmdline";
 
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 09/16] rump kernels: Provide networking test
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (7 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 08/16] rump kernels: Provide proper DHCP instructions to rumprun Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 10/16] TestSupport: guest_unprepare_disk: Make a no-op for guests with no Lvdev Ian Jackson
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Introduce our own version of `nc -e echo', to replace the removed rump
kernel WOPR test (which we were using to check that networking
worked).

This test program works when compiled on Linux too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 make-flight           |  4 ++--
 sg-run-job            |  6 +++++
 ts-rumprun-demo-build | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+), 2 deletions(-)
 create mode 100755 ts-rumprun-demo-build

diff --git a/make-flight b/make-flight
index 9b47999..17c3ce1 100755
--- a/make-flight
+++ b/make-flight
@@ -219,8 +219,8 @@ do_rumpkernel_tests () {
                       test-rumprun xl \
             $xenarch $dom0arch                                       \
             guests_rumprunbuildjob=build-$rumparch-rumprun   \
-     rump_builtimage=rumprun:/usr/local/lib/xen/rump-kernel/rump-kernel \
-            rump_cmdline=3                                           \
+            nettest_builtimage=rumpimages:nettest \
+            nettest_cmdline=4096 \
             xenstorels_builtimage=rumpimages:xenstorels              \
             xenstorels_cmdline='ls -fp device'                       \
             all_hostflags=$most_hostflags
diff --git a/sg-run-job b/sg-run-job
index e4e4e75..967c486 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -460,6 +460,10 @@ proc test-guest-nomigr {g} {
 
 proc need-hosts/test-rumprun {} { return host }
 proc run-job/test-rumprun {} {
+    set g nettest
+    run-ts . =   ts-rumprun-demo-setup + host $g
+    run-ts . =   ts-guest-start            + host $g
+    run-ts . =   ts-guest-destroy          + host $g
     set g xenstorels
     run-ts . =   ts-rumprun-demo-setup      + host + $g
     run-ts . =   ts-rumprun-demo-xenstorels + host + $g
@@ -495,8 +499,10 @@ proc run-job/build-libvirt {} {
 
 proc run-job/build-rumprun {} {
     run-ts . = ts-rumprun-build
+    run-ts . = ts-rumprun-demo-build + host + nettest rump-test-net
     run-ts . = ts-xen-build + host --no-kconfig tools
     run-ts . = ts-rumprun-bake + host \
+        nettest :nettest:/rump-test-net \
         xenstorels ::/usr/local/bin/xenstore-ls
 }
 
diff --git a/ts-rumprun-demo-build b/ts-rumprun-demo-build
new file mode 100755
index 0000000..c653d5b
--- /dev/null
+++ b/ts-rumprun-demo-build
@@ -0,0 +1,66 @@
+#!/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 File::Path;
+use POSIX;
+use Osstest::TestSupport;
+use Osstest::BuildSupport;
+
+tsreadconfig();
+selectbuildhost(\@ARGV);
+
+our $dokconfig = 1;
+
+while (@ARGV && $ARGV[0] =~ m/^-/) {
+    $_ = shift @ARGV;
+    last if m/^--$/;
+    die "$_ ?";
+}
+# remaining arguments are passed as targets to "make"
+
+die unless @ARGV==2;
+my ($demo,$bn) = @ARGV;
+
+builddirsprops();
+
+my $demodir;
+
+sub build () {
+    prepbuilddirs($demo);
+
+    $demodir = "$builddir/$demo";
+
+    target_putfile($ho, 30, "$bn.c", "$demodir/$bn.c");
+
+    my $make_prefix =      $r{cmdprefix_make}      // '';
+
+    target_cmd_build($ho, 300, $demodir, <<END);
+        set -x
+        $make_prefix
+        \${CROSS_COMPILE}gcc -Wall -o $bn $bn.c
+END
+}
+
+sub stash () {
+    built_stash($ho, $builddir, "$demo", "${demo}dist");
+}
+
+build();
+stash();
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 10/16] TestSupport: guest_unprepare_disk: Make a no-op for guests with no Lvdev
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (8 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 09/16] rump kernels: Provide networking test Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 11/16] rumprun: xenstorels: Better new regexps for finding output Ian Jackson
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This includes some rump kernel tests.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index bc3ad13..a63ff26 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1601,6 +1601,7 @@ END
 
 sub guest_unprepare_disk ($) {
     my ($gho) = @_;
+    return unless defined $gho->{Lvdev};
     return if $gho->{Diskfmt} eq "none";
     target_cmd_root($gho->{Host}, <<END);
 umount $gho->{Lvdev} || :
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 11/16] rumprun: xenstorels: Better new regexps for finding output
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (9 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 10/16] TestSupport: guest_unprepare_disk: Make a no-op for guests with no Lvdev Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 12/16] rumprun: Disable unwanted builds Ian Jackson
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

There is no need to match the _exit.  We can match the main return as
before, provided we tolerate the way it now says
   main() of "program" returned 0

This is an update to ea13503bc853 "rumprun: xenstorels: New regexps
for finding output" (which was insufficient to get the xenstorels test
to pass).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-rumprun-demo-xenstorels | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ts-rumprun-demo-xenstorels b/ts-rumprun-demo-xenstorels
index 3d29c46..b5f3b28 100755
--- a/ts-rumprun-demo-xenstorels
+++ b/ts-rumprun-demo-xenstorels
@@ -80,8 +80,7 @@ sub their_xenstorels () {
 	while ($output{theirs} =~ m{\n=== calling ".*" main\(\) ===\n\n}) {
 	    $output{theirs} = $'; #';
 	}
-	$output{theirs} =~ m{\n=== main\(\) returned (\d+) ===\n} or
-	$output{theirs} =~ m{\n=== ERROR: _exit\((\d+)\) called ===\n} or die;
+	$output{theirs} =~ m{\n=== main\(\) .* returned (\d+) ===\n} or die;
 	$output{theirs} = $`;
 	die "EXIT STATUS $1 ?" if $1 ne '0';
 	$output{theirs} =~ s{^STUB \`\`\w+'' called\n}{}mg;
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 12/16] rumprun: Disable unwanted builds
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (10 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 11/16] rumprun: xenstorels: Better new regexps for finding output Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 13/16] rump kernels: Adjust indentation in run-job/test-rumprun Ian Jackson
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 make-flight | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/make-flight b/make-flight
index 17c3ce1..1c53737 100755
--- a/make-flight
+++ b/make-flight
@@ -83,6 +83,14 @@ job_create_build_filter_callback () {
         *)			return 1 ;;
       esac
     ;;
+    rumprun)
+      case "$job" in
+        build-*-pvops)		;;
+        build-*-rumprun)	;;
+        build-*-*)		return 1 ;;
+        *)			;;
+      esac
+    ;;
   esac
   return 0
 }
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 13/16] rump kernels: Adjust indentation in run-job/test-rumprun
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (11 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 12/16] rumprun: Disable unwanted builds Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 14/16] rump kernels: Install binutils on test box Ian Jackson
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Whitespace change only.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-run-job | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sg-run-job b/sg-run-job
index 967c486..61cb369 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -461,16 +461,16 @@ proc test-guest-nomigr {g} {
 proc need-hosts/test-rumprun {} { return host }
 proc run-job/test-rumprun {} {
     set g nettest
-    run-ts . =   ts-rumprun-demo-setup + host $g
-    run-ts . =   ts-guest-start            + host $g
-    run-ts . =   ts-guest-destroy          + host $g
+    run-ts . =   ts-rumprun-demo-setup      + host $g
+    run-ts . =   ts-guest-start             + host $g
+    run-ts . =   ts-guest-destroy           + host $g
     set g xenstorels
     run-ts . =   ts-rumprun-demo-setup      + host + $g
     run-ts . =   ts-rumprun-demo-xenstorels + host + $g
-    run-ts . =   ts-guest-destroy-hard          + host + $g
+    run-ts . =   ts-guest-destroy-hard      + host + $g
     repeat-ts 150 =.repeat \
                  ts-rumprun-demo-xenstorels + host + $g   + \; \
-                 ts-guest-destroy-hard            host   $g   +
+                 ts-guest-destroy-hard        host   $g   +
 }
 
 if {[file exists sg-run-job-adhoc]} {
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 14/16] rump kernels: Install binutils on test box
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (12 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 13/16] rump kernels: Adjust indentation in run-job/test-rumprun Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 15/16] make-flight: Honour $bfi (build flight) for rump tests Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 16/16] rump kernels: Build with RUMP_DEV_XEN_DEBUG and filter out debug messages Ian Jackson
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

The `rumprun' tool needs `readelf' which is in binutils.

This introduces a new test step, which is idempotent.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-run-job           |  1 +
 ts-rumprun-test-prep | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100755 ts-rumprun-test-prep

diff --git a/sg-run-job b/sg-run-job
index 61cb369..57080e7 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -460,6 +460,7 @@ proc test-guest-nomigr {g} {
 
 proc need-hosts/test-rumprun {} { return host }
 proc run-job/test-rumprun {} {
+    run-ts . =   ts-rumprun-test-prep       + host
     set g nettest
     run-ts . =   ts-rumprun-demo-setup      + host $g
     run-ts . =   ts-guest-start             + host $g
diff --git a/ts-rumprun-test-prep b/ts-rumprun-test-prep
new file mode 100755
index 0000000..60be5f4
--- /dev/null
+++ b/ts-rumprun-test-prep
@@ -0,0 +1,36 @@
+#!/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 POSIX;
+use Osstest::TestSupport;
+use Osstest::Debian;
+
+tsreadconfig();
+
+our ($whhost) = @ARGV;
+$whhost ||= 'host';
+our $ho= selecthost($whhost);
+
+sub packages () {
+    target_install_packages($ho,
+			    qw(binutils));
+}
+
+packages();
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 15/16] make-flight: Honour $bfi (build flight) for rump tests
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (13 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 14/16] rump kernels: Install binutils on test box Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  2016-10-07 16:34 ` [OSSTEST PATCH 16/16] rump kernels: Build with RUMP_DEV_XEN_DEBUG and filter out debug messages Ian Jackson
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

A quick search suggests there are other a similar bugs...

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 make-flight | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make-flight b/make-flight
index 1c53737..c236f49 100755
--- a/make-flight
+++ b/make-flight
@@ -226,7 +226,7 @@ do_rumpkernel_tests () {
   job_create_test test-$xenarch$kern-$dom0arch-rumprun-$rumparch \
                       test-rumprun xl \
             $xenarch $dom0arch                                       \
-            guests_rumprunbuildjob=build-$rumparch-rumprun   \
+            guests_rumprunbuildjob=${bfi}build-$rumparch-rumprun   \
             nettest_builtimage=rumpimages:nettest \
             nettest_cmdline=4096 \
             xenstorels_builtimage=rumpimages:xenstorels              \
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [OSSTEST PATCH 16/16] rump kernels: Build with RUMP_DEV_XEN_DEBUG and filter out debug messages
  2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
                   ` (14 preceding siblings ...)
  2016-10-07 16:34 ` [OSSTEST PATCH 15/16] make-flight: Honour $bfi (build flight) for rump tests Ian Jackson
@ 2016-10-07 16:34 ` Ian Jackson
  15 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-10-07 16:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-rumprun-build           | 5 ++++-
 ts-rumprun-demo-xenstorels | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ts-rumprun-build b/ts-rumprun-build
index 1913f29..f408359 100755
--- a/ts-rumprun-build
+++ b/ts-rumprun-build
@@ -44,7 +44,10 @@ sub massage() {
 }
 
 sub build() {
-    target_cmd_build($ho, 7200, $rux, <<END);
+    my $debug_build = $r{rumprun_build_debug} || 'y';
+    target_cmd_build($ho, 7200, $rux, ($debug_build ? <<END : ''). <<END);
+        export RUMP_DEV_XEN_DEBUG=1
+END
         export XEN_HEADERS=$xendist/usr/local/include/xen
         (./build-rr.sh xen && touch ../build-ok-stamp) |tee ../log
         test -f ../build-ok-stamp #/
diff --git a/ts-rumprun-demo-xenstorels b/ts-rumprun-demo-xenstorels
index b5f3b28..4c45688 100755
--- a/ts-rumprun-demo-xenstorels
+++ b/ts-rumprun-demo-xenstorels
@@ -84,6 +84,8 @@ sub their_xenstorels () {
 	$output{theirs} = $`;
 	die "EXIT STATUS $1 ?" if $1 ne '0';
 	$output{theirs} =~ s{^STUB \`\`\w+'' called\n}{}mg;
+	$output{theirs} =~ s{^/dev/xen/xenbus[:[].*\n}{}mg;
+	$output{theirs} =~ s{^xen devsw:.*\n}{}mg;
     }, <<END);
         cat /var/log/xen/console/guest-$gn.log
 END
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-10-07 16:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-07 16:34 [OSSTEST PATCH 00/16] Fix rump kernel tests Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 01/16] rump-test-net: New test program Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 02/16] rump-test-net: setsockopt V6ONLY off Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 03/16] BuildSupport: builddirsprops: Clean up each builddir Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 04/16] Support guest-specific "toolstack" for guest creation Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 05/16] rump kernels: Provide rumprun toolstack Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 06/16] rump kernels: Specify toolstack for rumprun demo to be rumprun Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 07/16] rump kernels: ts-rumprun-bake: Do not tolerate errors Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 08/16] rump kernels: Provide proper DHCP instructions to rumprun Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 09/16] rump kernels: Provide networking test Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 10/16] TestSupport: guest_unprepare_disk: Make a no-op for guests with no Lvdev Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 11/16] rumprun: xenstorels: Better new regexps for finding output Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 12/16] rumprun: Disable unwanted builds Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 13/16] rump kernels: Adjust indentation in run-job/test-rumprun Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 14/16] rump kernels: Install binutils on test box Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 15/16] make-flight: Honour $bfi (build flight) for rump tests Ian Jackson
2016-10-07 16:34 ` [OSSTEST PATCH 16/16] rump kernels: Build with RUMP_DEV_XEN_DEBUG and filter out debug messages Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.