xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests
@ 2015-07-12 16:20 Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 01/13] toolstack: save / restore check Wei Liu
                   ` (12 more replies)
  0 siblings, 13 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

This series introduces libvirt remote migration test and HVM test.  It also
makes it possible to test libvirt guest save / restore functionality.

Now tests and their runvars:

diff -ub <(sort master-runvars) <(sort libvirt-runvars) | sed  's/[ \t]*$//' | egrep '^[\+|-]'
--- /dev/fd/63	2015-07-12 16:49:32.891735256 +0100
+++ /dev/fd/62	2015-07-12 16:49:32.891735256 +0100
+xen-unstable               test-amd64-amd64-libvirt-pair                         all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,equiv-1
+xen-unstable               test-amd64-amd64-libvirt-pair                         arch                        amd64
+xen-unstable               test-amd64-amd64-libvirt-pair                         buildjob                    build-amd64
+xen-unstable               test-amd64-amd64-libvirt-pair                         debian_arch                 amd64
+xen-unstable               test-amd64-amd64-libvirt-pair                         debian_kernkind             pvops
+xen-unstable               test-amd64-amd64-libvirt-pair                         kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-amd64-libvirt-pair                         kernkind                    pvops
+xen-unstable               test-amd64-amd64-libvirt-pair                         libvirtbuildjob             build-amd64-libvirt
+xen-unstable               test-amd64-amd64-libvirt-pair                         toolstack                   libvirt
+xen-unstable               test-amd64-amd64-libvirt-pair                         xenbuildjob                 build-amd64
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        arch                        amd64
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        bios                        seabios
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        buildjob                    build-amd64
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        device_model_version        qemu-xen
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        enable_xsm                  false
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        kernkind                    pvops
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        libvirtbuildjob             build-amd64-libvirt
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        toolstack                   libvirt
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64        xenbuildjob                 build-amd64
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    all_hostflags               arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    arch                        amd64
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    bios                        seabios
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    buildjob                    build-amd64-xsm
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    device_model_version        qemu-xen
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    enable_xsm                  true
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    kernbuildjob                build-amd64-pvops
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    kernkind                    pvops
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    libvirtbuildjob             build-amd64-libvirt
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    toolstack                   libvirt
+xen-unstable               test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm    xenbuildjob                 build-amd64-xsm
+xen-unstable               test-amd64-i386-libvirt-pair                          all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,equiv-1
+xen-unstable               test-amd64-i386-libvirt-pair                          arch                        i386
+xen-unstable               test-amd64-i386-libvirt-pair                          buildjob                    build-i386
+xen-unstable               test-amd64-i386-libvirt-pair                          debian_arch                 i386
+xen-unstable               test-amd64-i386-libvirt-pair                          debian_kernkind             pvops
+xen-unstable               test-amd64-i386-libvirt-pair                          kernbuildjob                build-i386-pvops
+xen-unstable               test-amd64-i386-libvirt-pair                          kernkind                    pvops
+xen-unstable               test-amd64-i386-libvirt-pair                          libvirtbuildjob             build-i386-libvirt
+xen-unstable               test-amd64-i386-libvirt-pair                          toolstack                   libvirt
+xen-unstable               test-amd64-i386-libvirt-pair                          xenbuildjob                 build-amd64
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         arch                        i386
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         bios                        seabios
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         buildjob                    build-i386
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         device_model_version        qemu-xen
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         enable_xsm                  false
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         kernbuildjob                build-i386-pvops
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         kernkind                    pvops
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         libvirtbuildjob             build-i386-libvirt
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         toolstack                   libvirt
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64         xenbuildjob                 build-amd64
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     all_hostflags               arch-i386,arch-xen-amd64,suite-wheezy,purpose-test,hvm
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     arch                        i386
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     bios                        seabios
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     buildjob                    build-i386-xsm
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     debianhvm_image             debian-7.2.0-amd64-CD-1.iso
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     device_model_version        qemu-xen
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     enable_xsm                  true
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     kernbuildjob                build-i386-pvops
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     kernkind                    pvops
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     libvirtbuildjob             build-i386-libvirt
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     toolstack                   libvirt
+xen-unstable               test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm     xenbuildjob                 build-amd64-xsm

Ian Jackson (1):
  osstest migrate support check catch -> variables

Wei Liu (12):
  toolstack: save / restore check
  Introduce ts-saverestore-support-check
  toolstack: distinguish local and remote migration support
  sg-run-job: remove save/restore dependency on local migration support
  toolstack/libvirt: guest migrate, save and restore support
  ts-xen-build-prep: install ebtables
  ts-libvirt-build: run libvirt test suite
  ts-debian-hvm-install: stub out libvirt + ovmf / rombios
  TestSupport: don't put kernel='hvmloader' in HVM config
  make-flight: debian hvm tests with libvirt
  make-flight, mfi-common: rename onetoolstack to pairtoolstack
  make-flight, mfi-common: create live migration test for libvirt

 Osstest/TestSupport.pm       |  1 -
 Osstest/Toolstack/libvirt.pm | 41 ++++++++++++++++++++++++++++++++++++-----
 Osstest/Toolstack/xend.pm    |  5 ++++-
 Osstest/Toolstack/xl.pm      | 16 +++++++++++++---
 make-flight                  | 42 ++++++++++++++++++++++++++++++------------
 mfi-common                   | 11 +++++++----
 sg-run-job                   | 17 +++++++++++++----
 ts-debian-hvm-install        |  7 +++++++
 ts-libvirt-build             | 35 ++++++++++++++++++++++++++---------
 ts-migrate-support-check     |  6 +++++-
 ts-saverestore-support-check | 27 +++++++++++++++++++++++++++
 ts-xen-build-prep            |  2 +-
 12 files changed, 169 insertions(+), 41 deletions(-)
 create mode 100755 ts-saverestore-support-check

-- 
1.9.1

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

* [PATCH OSSTEST v2 01/13] toolstack: save / restore check
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:09   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 02/13] Introduce ts-saverestore-support-check Wei Liu
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Introduce _$TOOLSTACK_check_for_command function and use it to check
save / restore functionality.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: introduce $TOOLSTACK_check_for_command function.
---
 Osstest/Toolstack/libvirt.pm | 14 ++++++++++++++
 Osstest/Toolstack/xend.pm    |  3 +++
 Osstest/Toolstack/xl.pm      | 16 +++++++++++++---
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 51a10de..592cfa2 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -77,6 +77,20 @@ sub migrate_check ($) {
     die "Migration check is not yet supported on libvirt.";
 }
 
+sub _libvirt_check_for_command($$) {
+    my ($self,$cmd) = @_;
+    my $ho = $self->{Host};
+    my $help = target_cmd_output_root($ho, "virsh help");
+    my $rc = ($help =~ m/^\s*$cmd/m) ? 0 : 1;
+    logm("rc=$rc");
+    return $rc;
+}
+
+sub saverestore_check ($) {
+    my ($self) = @_;
+    return _libvirt_check_for_command($self, "save");
+}
+
 sub migrate ($) {
     my ($self,$gho,$dst,$timeout) = @_;
     die "Migration is not yet supported on libvirt.";
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index 972b3b1..fd54ae1 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -38,4 +38,7 @@ sub new {
 # xend always supported migration
 sub migrate_check ($) { return 0; }
 
+# xend always supported save / restore
+sub saverestore_check ($) { return 0; }
+
 1;
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index 3c3d348..440d9d0 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -61,15 +61,25 @@ sub shutdown_wait ($$$) {
     target_cmd_root($ho,"$self->{_Command} shutdown -w${acpi_fallback} $gn", $timeout);
 }
 
-sub migrate_check ($) {
-    my ($self) = @_;
+sub _xl_check_for_command($$) {
+    my ($self,$cmd) = @_;
     my $ho = $self->{Host};
     my $help = target_cmd_output_root($ho, $self->{_Command}." help");
-    my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
+    my $rc = ($help =~ m/^\s*$cmd/m) ? 0 : 1;
     logm("rc=$rc");
     return $rc;
 }
 
+sub migrate_check ($) {
+    my ($self) = @_;
+    return _xl_check_for_command($self, "migrate");
+}
+
+sub saverestore_check ($) {
+    my ($self) = @_;
+    return _xl_check_for_command($self, "save");
+}
+
 sub migrate ($$$$) {
     my ($self,$gho,$dho,$timeout) = @_;
     my $sho = $self->{Host};
-- 
1.9.1

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

* [PATCH OSSTEST v2 02/13] Introduce ts-saverestore-support-check
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 01/13] toolstack: save / restore check Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables Wei Liu
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

We need this script because we're going to separate the concept of save
/ restore and migration later.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-saverestore-support-check | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 ts-saverestore-support-check

diff --git a/ts-saverestore-support-check b/ts-saverestore-support-check
new file mode 100755
index 0000000..71514fc
--- /dev/null
+++ b/ts-saverestore-support-check
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 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 $ho = selecthost($ARGV[0]);
+
+exit(toolstack($ho)->saverestore_check());
-- 
1.9.1

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

* [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 01/13] toolstack: save / restore check Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 02/13] Introduce ts-saverestore-support-check Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:14   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support Wei Liu
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: Wei Liu, ian.jackson, ian.campbell

From: Ian Jackson <Ian.Jackson@eu.citrix.com>

The goal here is to skip the following test steps if the check fails.

Instead of using catch to turn an exception into value, we can just
use spawn-ts and reap-ts to do that. This pattern is useful when we add
in extra check for save / restore check later.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ wei: write commit message ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 sg-run-job | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sg-run-job b/sg-run-job
index d53fd83..61f88fb 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -300,7 +300,9 @@ proc run-job/test-pair {} {
 }
 
 proc test-guest-migr {g} {
-    if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
+    set to_reap [spawn-ts . = ts-migrate-support-check + host $g]
+    set can_migrate [reap-ts $to_reap]
+    if {!$can_migrate} return
 
     foreach iteration {{} .2} {
         run-ts . =$iteration ts-guest-saverestore + host $g
-- 
1.9.1

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

* [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (2 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:19   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local " Wei Liu
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Libvirt supports migrating a guest to remote host but not local host.
Distinguish the concept of local migration support and remote migration
support.

Toolstack's migrate_check now takes an extra argument to indicate which
mode we're interested in.

In sg-run-job we still check for local migration support because that's
the implicit target in test-guest-migr. Libvirt will still be blocked.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: use bool instead of "local" "remote" string
---
 Osstest/Toolstack/libvirt.pm | 18 +++++++++++++++---
 Osstest/Toolstack/xend.pm    |  2 +-
 Osstest/Toolstack/xl.pm      |  4 ++--
 sg-run-job                   |  2 +-
 ts-migrate-support-check     |  6 +++++-
 5 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 592cfa2..ddf84df 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -72,9 +72,21 @@ sub shutdown_wait ($$$) {
     guest_await_destroy($gho,$timeout);
 }
 
-sub migrate_check ($) {
-    my ($self) = @_;
-    die "Migration check is not yet supported on libvirt.";
+sub migrate_check ($$) {
+    my ($self, $local) = @_;
+    my $rc;
+
+    if ($local) {
+        # local migration is not supported
+        $rc = 1;
+    } else {
+	my $ho = $self->{Host};
+	my $caps = target_cmd_output_root($ho, "virsh capabilities");
+	$rc = ($caps =~ m/<migration_features>/) ? 0 : 1
+    }
+
+    logm("rc=$rc");
+    return $rc;
 }
 
 sub _libvirt_check_for_command($$) {
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index fd54ae1..b435938 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -36,7 +36,7 @@ sub new {
 }
 
 # xend always supported migration
-sub migrate_check ($) { return 0; }
+sub migrate_check ($$) { return 0; }
 
 # xend always supported save / restore
 sub saverestore_check ($) { return 0; }
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index 440d9d0..0c4aff8 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -70,8 +70,8 @@ sub _xl_check_for_command($$) {
     return $rc;
 }
 
-sub migrate_check ($) {
-    my ($self) = @_;
+sub migrate_check ($$) {
+    my ($self,$local) = @_;
     return _xl_check_for_command($self, "migrate");
 }
 
diff --git a/sg-run-job b/sg-run-job
index 61f88fb..16fcfc1 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -300,7 +300,7 @@ proc run-job/test-pair {} {
 }
 
 proc test-guest-migr {g} {
-    set to_reap [spawn-ts . = ts-migrate-support-check + host $g]
+    set to_reap [spawn-ts . = ts-migrate-support-check + host $g 1]
     set can_migrate [reap-ts $to_reap]
     if {!$can_migrate} return
 
diff --git a/ts-migrate-support-check b/ts-migrate-support-check
index cd41f68..f877c09 100755
--- a/ts-migrate-support-check
+++ b/ts-migrate-support-check
@@ -23,5 +23,9 @@ use Osstest::TestSupport;
 tsreadconfig();
 
 our $ho = selecthost($ARGV[0]);
+# $ARGV[1] is guest name, $ARG[2] indicates whether it is checking for
+# local migration or remote migration
+# Mode should be either 1 ("local") or 0 ("remote")
+our $mode = $ARGV[2];
 
-exit(toolstack($ho)->migrate_check());
+exit(toolstack($ho)->migrate_check($mode));
-- 
1.9.1

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

* [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local migration support
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (3 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:22   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support Wei Liu
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Since we've introduced different checks for save / restore and local
migration, it's possible to run save / restore tests without running
local migration tests.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sg-run-job | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/sg-run-job b/sg-run-job
index 16fcfc1..172214e 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -302,13 +302,20 @@ proc run-job/test-pair {} {
 proc test-guest-migr {g} {
     set to_reap [spawn-ts . = ts-migrate-support-check + host $g 1]
     set can_migrate [reap-ts $to_reap]
-    if {!$can_migrate} return
+    set to_reap [spawn-ts . = ts-saverestore-support-check + host]
+    set can_saverestore [reap-ts $to_reap]
 
     foreach iteration {{} .2} {
-        run-ts . =$iteration ts-guest-saverestore + host $g
-        run-ts . =$iteration ts-guest-localmigrate + host $g
+        if {$can_saverestore} {
+            run-ts . =$iteration ts-guest-saverestore + host $g
+        }
+        if {$can_migrate} {
+            run-ts . =$iteration ts-guest-localmigrate + host $g
+        }
+    }
+    if {$can_migrate} {
+        run-ts . = ts-guest-localmigrate x10 + host $g
     }
-    run-ts . = ts-guest-localmigrate x10 + host $g
 }
 
 proc test-guest {g} {
-- 
1.9.1

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

* [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (4 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local " Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:23   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 07/13] ts-xen-build-prep: install ebtables Wei Liu
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/Toolstack/libvirt.pm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index ddf84df..3dc1856 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -105,17 +105,22 @@ sub saverestore_check ($) {
 
 sub migrate ($) {
     my ($self,$gho,$dst,$timeout) = @_;
-    die "Migration is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    my $gn = $gho->{Name};
+    target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
 }
 
 sub save ($$$$) {
     my ($self,$gho,$f,$timeout) = @_;
-    die "Save is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    my $gn = $gho->{Name};
+    target_cmd_root($ho, "virsh save $gn $f", $timeout);
 }
 
 sub restore ($$$$) {
     my ($self,$gho,$f,$timeout) = @_;
-    die "Restore is not yet supported on libvirt.";
+    my $ho = $self->{Host};
+    target_cmd_root($ho, "virsh restore $f", $timeout);
 }
 
 1;
-- 
1.9.1

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

* [PATCH OSSTEST v2 07/13] ts-xen-build-prep: install ebtables
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (5 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite Wei Liu
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Libvirt's test suite needs it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 ts-xen-build-prep | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-xen-build-prep b/ts-xen-build-prep
index 9a3b523..03ad35c 100755
--- a/ts-xen-build-prep
+++ b/ts-xen-build-prep
@@ -206,7 +206,7 @@ sub prep () {
                       autoconf automake libtool xsltproc
                       libxml2-utils libxml2-dev
                       libdevmapper-dev w3c-dtd-xhtml libxml-xpath-perl
-                      ccache nasm checkpolicy);
+                      ccache nasm checkpolicy ebtables);
 
     if ($ho->{Suite} =~ m/wheezy|squeeze|lenny/) {
 	push(@packages, "libnl-dev");
-- 
1.9.1

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

* [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (6 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 07/13] ts-xen-build-prep: install ebtables Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:25   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios Wei Liu
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

We're interested in xlconfigtest.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-libvirt-build | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/ts-libvirt-build b/ts-libvirt-build
index f764b53..713bea0 100755
--- a/ts-libvirt-build
+++ b/ts-libvirt-build
@@ -27,6 +27,7 @@ builddirsprops();
 
 our %submodmap = qw(gnulib gnulib);
 our $submodules;
+our $xenprefix;
 
 sub libvirtd_init ();
 
@@ -39,15 +40,6 @@ sub checkout () {
 }
 
 sub config() {
-    my $xenprefix;
-    foreach (qw(/usr/local /usr)) {
-	if (target_file_exists($ho, "$xendist$_/lib/libxenctrl.so")) {
-	    $xenprefix="$xendist$_";
-	    last;
-	}
-    }
-    die "no xen prefix" unless $xenprefix;
-
     # Uses --no-git because otherwise autogen.sh will undo
     # submodulefixup's attempts to honour
     # revision_libvirt_gnulib. This in turn requires that we specify
@@ -75,6 +67,19 @@ sub build() {
 END
 }
 
+sub runtest() {
+     target_cmd_build($ho, 3600, $builddir, <<END);
+        cd libvirt
+        rm -f ../libvirt-test-suite-ok-stamp
+        (LD_LIBRARY_PATH=$xenprefix/lib/ \\
+             make check VIR_TEST_EXPENSIVE=1 2>&1 && \\
+             touch ../libvirt-test-suite-ok-stamp) \\
+             | tee ../libvirt-test-suite-log
+        test -f ../libvirt-test-suite-ok-stamp #/
+        echo ok.
+END
+}
+
 sub install() {
     target_cmd_build($ho, 300, $builddir, <<END);
         mkdir -p dist
@@ -90,9 +95,21 @@ END
 END
 }
 
+sub setxenprefix() {
+    foreach (qw(/usr/local /usr)) {
+        if (target_file_exists($ho, "$xendist$_/lib/libxenctrl.so")) {
+            $xenprefix="$xendist$_";
+            last;
+        }
+    }
+    die "no xen prefix" unless $xenprefix;
+}
+
 checkout();
+setxenprefix();
 config();
 build();
+runtest();
 install();
 built_stash($ho, $builddir, 'dist', 'libvirtdist');
 
-- 
1.9.1

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

* [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (7 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:27   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config Wei Liu
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Libvirt's configuration converter doesn't know how to deal with BIOS
selection. The end result is it always use the default one (seabios).
Stub out ovmf and rombios to avoid false positive results.

This restriction will be removed once libvirt's converter knows how to
deal with BIOS selection.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-debian-hvm-install | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index f05b1a7..bd16506 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -28,6 +28,13 @@ if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; }
 
 defined($r{bios}) or die "Need to define which bios to use";
 
+# Libvirt doesn't know anything about bios. It will always use the
+# default one (seabios). Stub out rombios and ovmf to avoid false
+# positive results.
+if ($r{bios} =~ m/ovmf|rombios/ && $r{toolstack} eq 'libvirt') {
+    die "libvirt + $r{bios} is not supported yet.";
+}
+
 our ($whhost,$gn) = @ARGV;
 $whhost ||= 'host';
 $gn ||= 'debianhvm';
-- 
1.9.1

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

* [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (8 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:28   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt Wei Liu
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Setting kernel to hvmloader is ignored in xl but not in libvirt. Libvirt
config converter will translate that then pass it to QEMU. QEMU
complains there is no kernel called hvmloader and exits.

Just remove this option. Xl is not affected and libvirt will be able to
create HVM guest.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Not sure if this affects Xend. We seem to only have one test case for
xend in 4.3.
---
 Osstest/TestSupport.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 66dc218..5336079 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1625,7 +1625,6 @@ sub more_prepareguest_hvm ($$$$;@) {
     my $disks = join ",\t\t\n", map { "'$_'" } @disks;
 
     my $cfg = <<END;
-kernel      = 'hvmloader'
 builder     = 'hvm'
 #
 disk        = [
-- 
1.9.1

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

* [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (9 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-13 11:33   ` Ian Campbell
  2015-07-12 16:20 ` [PATCH OSSTEST v2 12/13] make-flight, mfi-common: rename onetoolstack to pairtoolstack Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 13/13] make-flight, mfi-common: create live migration test for libvirt Wei Liu
  12 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

Since upstream QEMU is the default, that's what libvirt is using. We
generate test case to test libvirt with upstream QEMU.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 make-flight | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/make-flight b/make-flight
index c763ce9..96c6fe5 100755
--- a/make-flight
+++ b/make-flight
@@ -96,7 +96,9 @@ job_create_test_filter_callback () {
     *)
       case "$job" in
         *-qemuu-*)
-          if [ "x$toolstack" != xxl ]; then return 1; fi
+          if [ x$toolstack != xxl -a x$toolstack != xlibvirt ];then
+              return 1;
+          fi
           ;;
       esac
       ;;
@@ -215,16 +217,17 @@ do_hvm_debian_test_one () {
   bios=$2
   xsm=$3
   stubdom=$4
+  toolstack=$5
 
   stubdom_suffix=""
   stubdom_runvar=""
-  if [ x$stubdom != x ]; then
+  if [ x$stubdom = xtrue ]; then
       stubdom_suffix="-stubdom"
       stubdom_runvar="debianhvm_stubdom=$stubdom"
   fi
 
-  job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix$stubdom_suffix-$testname-amd64\
-    test-debianhvm xl $xenarch $dom0arch $qemuu_runvar \
+  job_create_test test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix$stubdom_suffix-$testname-amd64\
+    test-debianhvm $toolstack $xenarch $dom0arch $qemuu_runvar \
     enable_xsm=$xsm                             \
     $stubdom_runvar                             \
     debianhvm_image=debian-7.2.0-amd64-CD-1.iso \
@@ -239,20 +242,26 @@ do_hvm_debian_tests() {
     return
   fi
 
-  # QEMU upstream supports ovmf and seabios
+  # QEMU upstream supports
+  #   1. ovmf + xl
+  #   2. seabios + xl
+  #   3. seabios + libvirt
   if [ "x$qemuu_suffix" == "x-qemuu" ]; then
-    do_hvm_debian_test_one ovmf ovmf false
+    do_hvm_debian_test_one ovmf ovmf false false xl
     for xsm in $xsms ; do
-      do_hvm_debian_test_one debianhvm seabios $xsm
+      for toolstack in xl libvirt; do
+        do_hvm_debian_test_one debianhvm seabios $xsm false $toolstack
+      done
     done
   fi
 
   # QEMU traditional supports rombios and stubdom
+  # Only test xl with QEMU traditional
   if [ "x$qemuu_suffix" == "x-qemut" ]; then
     for xsm in $xsms ; do
-      do_hvm_debian_test_one debianhvm rombios $xsm
-      if [ x$xsm = xtrue ]; then
-          do_hvm_debian_test_one debianhvm rombios $xsm true
+      do_hvm_debian_test_one debianhvm rombios $xsm false xl
+      if [ x$xsm = xtrue -a x$toolstack = xxl ]; then
+          do_hvm_debian_test_one debianhvm rombios $xsm true xl
       fi
     done
   fi
-- 
1.9.1

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

* [PATCH OSSTEST v2 12/13] make-flight, mfi-common: rename onetoolstack to pairtoolstack
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (10 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  2015-07-12 16:20 ` [PATCH OSSTEST v2 13/13] make-flight, mfi-common: create live migration test for libvirt Wei Liu
  12 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, ian.campbell

The name "onetoolstack" in confusing. Currently it's in fact referring
to the toolstack used to test pair migration, so rename it to
"pairtoolstack".

No functional changes introduced.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 make-flight | 2 +-
 mfi-common  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/make-flight b/make-flight
index 96c6fe5..596b925 100755
--- a/make-flight
+++ b/make-flight
@@ -460,7 +460,7 @@ test_matrix_do_one () {
 
   # Test live migration
   job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \
-            $onetoolstack $xenarch $dom0arch \
+            $pairtoolstack $xenarch $dom0arch \
             !host !host_hostflags \
             $debian_runvars \
             all_hostflags=$most_hostflags,equiv-1
diff --git a/mfi-common b/mfi-common
index a9e966f..e517019 100644
--- a/mfi-common
+++ b/mfi-common
@@ -313,10 +313,10 @@ job_create_test () {
 test_matrix_iterate () {
 
   case "$xenbranch" in
-  xen-3.*-testing)      onetoolstack=xend ;;
-  xen-4.0-testing)      onetoolstack=xend ;;
-  xen-4.1-testing)      onetoolstack=xend ;;
-  *)                    onetoolstack=xl ;;
+  xen-3.*-testing)      pairtoolstack=xend ;;
+  xen-4.0-testing)      pairtoolstack=xend ;;
+  xen-4.1-testing)      pairtoolstack=xend ;;
+  *)                    pairtoolstack=xl ;;
   esac
 
   for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
-- 
1.9.1

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

* [PATCH OSSTEST v2 13/13] make-flight, mfi-common: create live migration test for libvirt
  2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
                   ` (11 preceding siblings ...)
  2015-07-12 16:20 ` [PATCH OSSTEST v2 12/13] make-flight, mfi-common: rename onetoolstack to pairtoolstack Wei Liu
@ 2015-07-12 16:20 ` Wei Liu
  12 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-12 16:20 UTC (permalink / raw)
  To: Xen-devel; +Cc: Anthony Perard, ian.jackson, Wei Liu, ian.campbell

Note that we start testing libvirt migration for 4.5 and above.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
Cc: Anthony Perard <anthony.perard@citrix.com>

Anthony, can you advise which Xen versions should we test?
---
 make-flight | 13 +++++++++++--
 mfi-common  |  5 ++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/make-flight b/make-flight
index 596b925..5c4fbb6 100755
--- a/make-flight
+++ b/make-flight
@@ -459,11 +459,20 @@ test_matrix_do_one () {
   done # qemuu_suffix
 
   # Test live migration
-  job_create_test test-$xenarch$kern-$dom0arch-pair test-pair \
-            $pairtoolstack $xenarch $dom0arch \
+  for toolstack in $pairtoolstack; do
+    # Don't change test case name for old test cases with xl and xend
+    if [ x$toolstack = xxl -o x$toolstack = xxend ]; then
+      toolstack_suffix=""
+    else
+      toolstack_suffix="-$toolstack"
+    fi
+    job_create_test test-$xenarch$kern-$dom0arch$toolstack_suffix-pair \
+            test-pair \
+            $toolstack $xenarch $dom0arch \
             !host !host_hostflags \
             $debian_runvars \
             all_hostflags=$most_hostflags,equiv-1
+  done
 
   if [ x$test_pvh = xy -a $xenarch = amd64 -a $dom0arch = amd64 ]; then
 
diff --git a/mfi-common b/mfi-common
index e517019..584627f 100644
--- a/mfi-common
+++ b/mfi-common
@@ -316,7 +316,10 @@ test_matrix_iterate () {
   xen-3.*-testing)      pairtoolstack=xend ;;
   xen-4.0-testing)      pairtoolstack=xend ;;
   xen-4.1-testing)      pairtoolstack=xend ;;
-  *)                    pairtoolstack=xl ;;
+  xen-4.2-testing)      pairtoolstack=xl ;;
+  xen-4.3-testing)      pairtoolstack=xl ;;
+  xen-4.4-testing)      pairtoolstack=xl ;;
+  *)                    pairtoolstack="xl libvirt" ;;
   esac
 
   for xenarch in ${TEST_ARCHES- i386 amd64 armhf } ; do
-- 
1.9.1

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

* Re: [PATCH OSSTEST v2 01/13] toolstack: save / restore check
  2015-07-12 16:20 ` [PATCH OSSTEST v2 01/13] toolstack: save / restore check Wei Liu
@ 2015-07-13 11:09   ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:09 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> Introduce _$TOOLSTACK_check_for_command function and use it to check
> save / restore functionality.

The _$TOOLSTACK_ prefix is not necessary IMHO, this is already within a
Perl module named $TOOLSTACK.pm (which you can think of as a class in
the OOP sense). (It seems like a Python-ism to me).

IOW I think just check_for_command would be fine. I don't think it needs
to be made private either, which would involve a bit more infrastructure
than is worthwhile IMHO.


> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
> v2: introduce $TOOLSTACK_check_for_command function.
> ---
>  Osstest/Toolstack/libvirt.pm | 14 ++++++++++++++
>  Osstest/Toolstack/xend.pm    |  3 +++
>  Osstest/Toolstack/xl.pm      | 16 +++++++++++++---
>  3 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> index 51a10de..592cfa2 100644
> --- a/Osstest/Toolstack/libvirt.pm
> +++ b/Osstest/Toolstack/libvirt.pm
> @@ -77,6 +77,20 @@ sub migrate_check ($) {
>      die "Migration check is not yet supported on libvirt.";
>  }
>  
> +sub _libvirt_check_for_command($$) {
> +    my ($self,$cmd) = @_;
> +    my $ho = $self->{Host};
> +    my $help = target_cmd_output_root($ho, "virsh help");
> +    my $rc = ($help =~ m/^\s*$cmd/m) ? 0 : 1;
> +    logm("rc=$rc");
> +    return $rc;
> +}
> +
> +sub saverestore_check ($) {
> +    my ($self) = @_;
> +    return _libvirt_check_for_command($self, "save");
> +}
> +
>  sub migrate ($) {
>      my ($self,$gho,$dst,$timeout) = @_;
>      die "Migration is not yet supported on libvirt.";
> diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
> index 972b3b1..fd54ae1 100644
> --- a/Osstest/Toolstack/xend.pm
> +++ b/Osstest/Toolstack/xend.pm
> @@ -38,4 +38,7 @@ sub new {
>  # xend always supported migration
>  sub migrate_check ($) { return 0; }
>  
> +# xend always supported save / restore
> +sub saverestore_check ($) { return 0; }
> +
>  1;
> diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
> index 3c3d348..440d9d0 100644
> --- a/Osstest/Toolstack/xl.pm
> +++ b/Osstest/Toolstack/xl.pm
> @@ -61,15 +61,25 @@ sub shutdown_wait ($$$) {
>      target_cmd_root($ho,"$self->{_Command} shutdown -w${acpi_fallback} $gn", $timeout);
>  }
>  
> -sub migrate_check ($) {
> -    my ($self) = @_;
> +sub _xl_check_for_command($$) {
> +    my ($self,$cmd) = @_;
>      my $ho = $self->{Host};
>      my $help = target_cmd_output_root($ho, $self->{_Command}." help");
> -    my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
> +    my $rc = ($help =~ m/^\s*$cmd/m) ? 0 : 1;
>      logm("rc=$rc");
>      return $rc;
>  }
>  
> +sub migrate_check ($) {
> +    my ($self) = @_;
> +    return _xl_check_for_command($self, "migrate");
> +}
> +
> +sub saverestore_check ($) {
> +    my ($self) = @_;
> +    return _xl_check_for_command($self, "save");
> +}
> +
>  sub migrate ($$$$) {
>      my ($self,$gho,$dho,$timeout) = @_;
>      my $sho = $self->{Host};

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

* Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-12 16:20 ` [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables Wei Liu
@ 2015-07-13 11:14   ` Ian Campbell
  2015-07-21 16:32     ` Ian Jackson
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:14 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> @@ -300,7 +300,9 @@ proc run-job/test-pair {} {
>  }
>  
>  proc test-guest-migr {g} {
> -    if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
> +    set to_reap [spawn-ts . = ts-migrate-support-check + host $g]

Most other uses of spawn-ts use [eval spawn-ts <stuff>]. I think those
are just trying to expand a $args into multiple arguments to spawn-ts,
and hence that isn't needed here (because $g is a singleton argument
already). But TBH I don't know...

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

* Re: [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support
  2015-07-12 16:20 ` [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support Wei Liu
@ 2015-07-13 11:19   ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:19 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> @@ -23,5 +23,9 @@ use Osstest::TestSupport;
>  tsreadconfig();
>  
>  our $ho = selecthost($ARGV[0]);
> +# $ARGV[1] is guest name, $ARG[2] indicates whether it is checking for
> +# local migration or remote migration
> +# Mode should be either 1 ("local") or 0 ("remote")
> +our $mode = $ARGV[2];

I think:

our ($whhost, $gn, $mode) = @ARGV;
our $ho = selecthost($whhost);

would be preferable to the first two lines of the comment.


> -exit(toolstack($ho)->migrate_check());
> +exit(toolstack($ho)->migrate_check($mode));

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

* Re: [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local migration support
  2015-07-12 16:20 ` [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local " Wei Liu
@ 2015-07-13 11:22   ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:22 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> Since we've introduced different checks for save / restore and local
> migration, it's possible to run save / restore tests without running
> local migration tests.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  sg-run-job | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/sg-run-job b/sg-run-job
> index 16fcfc1..172214e 100755
> --- a/sg-run-job
> +++ b/sg-run-job
> @@ -302,13 +302,20 @@ proc run-job/test-pair {} {
>  proc test-guest-migr {g} {
>      set to_reap [spawn-ts . = ts-migrate-support-check + host $g 1]
>      set can_migrate [reap-ts $to_reap]
> -    if {!$can_migrate} return
> +    set to_reap [spawn-ts . = ts-saverestore-support-check + host]

ts-migrate-support-check takes the guest name, even though it doesn't
actually need it today. I think this is justifiable because the decision
as to whether migration or s/r could be achieve _might_ be dependent on
the guest cfg.

Thus I think ts-saverrestore-support-check ought to take $g too for
consistency with that and with ts-guest-migrate too.

Or $g it could be removed from the migrate check, but that's not my
preference.

> +    set can_saverestore [reap-ts $to_reap]
>  
>      foreach iteration {{} .2} {
> -        run-ts . =$iteration ts-guest-saverestore + host $g
> -        run-ts . =$iteration ts-guest-localmigrate + host $g
> +        if {$can_saverestore} {
> +            run-ts . =$iteration ts-guest-saverestore + host $g
> +        }
> +        if {$can_migrate} {
> +            run-ts . =$iteration ts-guest-localmigrate + host $g
> +        }
> +    }
> +    if {$can_migrate} {
> +        run-ts . = ts-guest-localmigrate x10 + host $g
>      }
> -    run-ts . = ts-guest-localmigrate x10 + host $g
>  }
>  
>  proc test-guest {g} {

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

* Re: [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support
  2015-07-12 16:20 ` [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support Wei Liu
@ 2015-07-13 11:23   ` Ian Campbell
  2015-07-21 16:17     ` Wei Liu
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:23 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:

Perhaps the libvirt part of the check_for_command stuff ought to be
moved here? Otherwise we are claiming support before the code is
actually willing to try to do so.

> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  Osstest/Toolstack/libvirt.pm | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> index ddf84df..3dc1856 100644
> --- a/Osstest/Toolstack/libvirt.pm
> +++ b/Osstest/Toolstack/libvirt.pm
> @@ -105,17 +105,22 @@ sub saverestore_check ($) {
>  
>  sub migrate ($) {
>      my ($self,$gho,$dst,$timeout) = @_;
> -    die "Migration is not yet supported on libvirt.";
> +    my $ho = $self->{Host};
> +    my $gn = $gho->{Name};
> +    target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
>  }
>  
>  sub save ($$$$) {
>      my ($self,$gho,$f,$timeout) = @_;
> -    die "Save is not yet supported on libvirt.";
> +    my $ho = $self->{Host};
> +    my $gn = $gho->{Name};
> +    target_cmd_root($ho, "virsh save $gn $f", $timeout);
>  }
>  
>  sub restore ($$$$) {
>      my ($self,$gho,$f,$timeout) = @_;
> -    die "Restore is not yet supported on libvirt.";
> +    my $ho = $self->{Host};
> +    target_cmd_root($ho, "virsh restore $f", $timeout);
>  }
>  
>  1;

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

* Re: [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite
  2015-07-12 16:20 ` [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite Wei Liu
@ 2015-07-13 11:25   ` Ian Campbell
  2015-07-21 16:22     ` Wei Liu
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:25 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> We're interested in xlconfigtest.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> [...]
> +             | tee ../libvirt-test-suite-log

Should something be collecting/stashing that log file?

I think since it is logged to the output of the command it's probably
not needed, but I suppose you added the tee for a reason?

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

* Re: [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios
  2015-07-12 16:20 ` [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios Wei Liu
@ 2015-07-13 11:27   ` Ian Campbell
  2015-07-21 16:24     ` Wei Liu
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:27 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> Libvirt's configuration converter doesn't know how to deal with BIOS
> selection. The end result is it always use the default one (seabios).
> Stub out ovmf and rombios to avoid false positive results.

It's worth mentioning here whether or not we expect to currently see
such configurations in osstest today.

If we do expect to see them then it would be good to filter them in
make-flight to avoid wasting lots of test time.

> 
> This restriction will be removed once libvirt's converter knows how to
> deal with BIOS selection.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  ts-debian-hvm-install | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
> index f05b1a7..bd16506 100755
> --- a/ts-debian-hvm-install
> +++ b/ts-debian-hvm-install
> @@ -28,6 +28,13 @@ if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; }
>  
>  defined($r{bios}) or die "Need to define which bios to use";
>  
> +# Libvirt doesn't know anything about bios. It will always use the
> +# default one (seabios). Stub out rombios and ovmf to avoid false
> +# positive results.
> +if ($r{bios} =~ m/ovmf|rombios/ && $r{toolstack} eq 'libvirt') {
> +    die "libvirt + $r{bios} is not supported yet.";
> +}
> +
>  our ($whhost,$gn) = @ARGV;
>  $whhost ||= 'host';
>  $gn ||= 'debianhvm';

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

* Re: [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config
  2015-07-12 16:20 ` [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config Wei Liu
@ 2015-07-13 11:28   ` Ian Campbell
  2015-07-13 11:34     ` Ian Campbell
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:28 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> Setting kernel to hvmloader is ignored in xl but not in libvirt. Libvirt
> config converter will translate that then pass it to QEMU. QEMU
> complains there is no kernel called hvmloader and exits.
> 
> Just remove this option. Xl is not affected and libvirt will be able to
> create HVM guest.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> Not sure if this affects Xend. We seem to only have one test case for
> xend in 4.3.

I fear it might indeed break things for 4.3 and older with xend.

> ---
>  Osstest/TestSupport.pm | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> index 66dc218..5336079 100644
> --- a/Osstest/TestSupport.pm
> +++ b/Osstest/TestSupport.pm
> @@ -1625,7 +1625,6 @@ sub more_prepareguest_hvm ($$$$;@) {
>      my $disks = join ",\t\t\n", map { "'$_'" } @disks;
>  
>      my $cfg = <<END;
> -kernel      = 'hvmloader'
>  builder     = 'hvm'
>  #
>  disk        = [

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

* Re: [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt
  2015-07-12 16:20 ` [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt Wei Liu
@ 2015-07-13 11:33   ` Ian Campbell
  2015-07-13 13:12     ` Wei Liu
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:33 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> @@ -215,16 +217,17 @@ do_hvm_debian_test_one () {
>    bios=$2
>    xsm=$3
>    stubdom=$4
> +  toolstack=$5

Nit: For consistency with other similar function (job_create and filter
in particular) I think toolstack should be inserted as $2, after
$testname and before $bios.

Otherwise things look good to me. A diff of the runvars is always nice
though.

Ian.

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

* Re: [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config
  2015-07-13 11:28   ` Ian Campbell
@ 2015-07-13 11:34     ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-13 11:34 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Mon, 2015-07-13 at 12:28 +0100, Ian Campbell wrote:
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > Setting kernel to hvmloader is ignored in xl but not in libvirt. Libvirt
> > config converter will translate that then pass it to QEMU. QEMU
> > complains there is no kernel called hvmloader and exits.
> > 
> > Just remove this option. Xl is not affected and libvirt will be able to
> > create HVM guest.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > ---
> > Not sure if this affects Xend. We seem to only have one test case for
> > xend in 4.3.
> 
> I fear it might indeed break things for 4.3 and older with xend.

BTW, rather than faffing trying to find out, I'd be inclined to just
insert it if the toolstack is xend and omit it otherwise.

> 
> > ---
> >  Osstest/TestSupport.pm | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> > index 66dc218..5336079 100644
> > --- a/Osstest/TestSupport.pm
> > +++ b/Osstest/TestSupport.pm
> > @@ -1625,7 +1625,6 @@ sub more_prepareguest_hvm ($$$$;@) {
> >      my $disks = join ",\t\t\n", map { "'$_'" } @disks;
> >  
> >      my $cfg = <<END;
> > -kernel      = 'hvmloader'
> >  builder     = 'hvm'
> >  #
> >  disk        = [
> 

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

* Re: [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt
  2015-07-13 11:33   ` Ian Campbell
@ 2015-07-13 13:12     ` Wei Liu
  0 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-13 13:12 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Mon, Jul 13, 2015 at 12:33:24PM +0100, Ian Campbell wrote:
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > @@ -215,16 +217,17 @@ do_hvm_debian_test_one () {
> >    bios=$2
> >    xsm=$3
> >    stubdom=$4
> > +  toolstack=$5
> 
> Nit: For consistency with other similar function (job_create and filter
> in particular) I think toolstack should be inserted as $2, after
> $testname and before $bios.
> 
> Otherwise things look good to me. A diff of the runvars is always nice
> though.
> 

Changes to runvars in patch #0

> Ian.

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

* Re: [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support
  2015-07-13 11:23   ` Ian Campbell
@ 2015-07-21 16:17     ` Wei Liu
  0 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-21 16:17 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Mon, Jul 13, 2015 at 12:23:52PM +0100, Ian Campbell wrote:
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> 
> Perhaps the libvirt part of the check_for_command stuff ought to be
> moved here? Otherwise we are claiming support before the code is
> actually willing to try to do so.

I move this patch before "toolstack: distinguish local and remote
migration support" (the patch that claims support). It should be fine
now.

Wei.

> 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> >  Osstest/Toolstack/libvirt.pm | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
> > index ddf84df..3dc1856 100644
> > --- a/Osstest/Toolstack/libvirt.pm
> > +++ b/Osstest/Toolstack/libvirt.pm
> > @@ -105,17 +105,22 @@ sub saverestore_check ($) {
> >  
> >  sub migrate ($) {
> >      my ($self,$gho,$dst,$timeout) = @_;
> > -    die "Migration is not yet supported on libvirt.";
> > +    my $ho = $self->{Host};
> > +    my $gn = $gho->{Name};
> > +    target_cmd_root($ho, "virsh migrate $gn $dst", $timeout);
> >  }
> >  
> >  sub save ($$$$) {
> >      my ($self,$gho,$f,$timeout) = @_;
> > -    die "Save is not yet supported on libvirt.";
> > +    my $ho = $self->{Host};
> > +    my $gn = $gho->{Name};
> > +    target_cmd_root($ho, "virsh save $gn $f", $timeout);
> >  }
> >  
> >  sub restore ($$$$) {
> >      my ($self,$gho,$f,$timeout) = @_;
> > -    die "Restore is not yet supported on libvirt.";
> > +    my $ho = $self->{Host};
> > +    target_cmd_root($ho, "virsh restore $f", $timeout);
> >  }
> >  
> >  1;
> 

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

* Re: [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite
  2015-07-13 11:25   ` Ian Campbell
@ 2015-07-21 16:22     ` Wei Liu
  2015-07-21 16:33       ` Ian Campbell
  0 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-21 16:22 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Mon, Jul 13, 2015 at 12:25:35PM +0100, Ian Campbell wrote:
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > We're interested in xlconfigtest.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > [...]
> > +             | tee ../libvirt-test-suite-log
> 
> Should something be collecting/stashing that log file?
> 

Not sure.

> I think since it is logged to the output of the command it's probably
> not needed, but I suppose you added the tee for a reason?
> 

I followed suite. There is "tee log" in build command. I can't seem to
find that log stashed anywhere though.

What should I do about this?

Wei.

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

* Re: [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios
  2015-07-13 11:27   ` Ian Campbell
@ 2015-07-21 16:24     ` Wei Liu
  0 siblings, 0 replies; 33+ messages in thread
From: Wei Liu @ 2015-07-21 16:24 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu, ian.jackson

On Mon, Jul 13, 2015 at 12:27:30PM +0100, Ian Campbell wrote:
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > Libvirt's configuration converter doesn't know how to deal with BIOS
> > selection. The end result is it always use the default one (seabios).
> > Stub out ovmf and rombios to avoid false positive results.
> 
> It's worth mentioning here whether or not we expect to currently see
> such configurations in osstest today.
> 

I don't expect to see those configurations any time soon. I will explain
this in commit message.

> If we do expect to see them then it would be good to filter them in
> make-flight to avoid wasting lots of test time.
> 

The filtering is done in later patch.

This change is more like another level of safety in case we change
something in make-flight by mistake.

Wei.

> > 
> > This restriction will be removed once libvirt's converter knows how to
> > deal with BIOS selection.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > ---
> >  ts-debian-hvm-install | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
> > index f05b1a7..bd16506 100755
> > --- a/ts-debian-hvm-install
> > +++ b/ts-debian-hvm-install
> > @@ -28,6 +28,13 @@ if (@ARGV && $ARGV[0] =~ m/^--stage(\d+)$/) { $stage=$1; shift @ARGV; }
> >  
> >  defined($r{bios}) or die "Need to define which bios to use";
> >  
> > +# Libvirt doesn't know anything about bios. It will always use the
> > +# default one (seabios). Stub out rombios and ovmf to avoid false
> > +# positive results.
> > +if ($r{bios} =~ m/ovmf|rombios/ && $r{toolstack} eq 'libvirt') {
> > +    die "libvirt + $r{bios} is not supported yet.";
> > +}
> > +
> >  our ($whhost,$gn) = @ARGV;
> >  $whhost ||= 'host';
> >  $gn ||= 'debianhvm';
> 

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

* Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-13 11:14   ` Ian Campbell
@ 2015-07-21 16:32     ` Ian Jackson
  2015-07-21 17:12       ` Wei Liu
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Jackson @ 2015-07-21 16:32 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Xen-devel, Wei Liu

Ian Campbell writes ("Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables"):
> On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > @@ -300,7 +300,9 @@ proc run-job/test-pair {} {
> >  proc test-guest-migr {g} {
> > -    if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
> > +    set to_reap [spawn-ts . = ts-migrate-support-check + host $g]
> 
> Most other uses of spawn-ts use [eval spawn-ts <stuff>]. I think those
> are just trying to expand a $args into multiple arguments to spawn-ts,
> and hence that isn't needed here (because $g is a singleton argument
> already). But TBH I don't know...

Yes, the effect of the
    set reap [eval spawn-ts $args]
is to expand the list in $args as arguments to spawn-ts.  $g is a
singleton as you say, not a list.

spawn-ts has the same argument convention as run-ts.

Ian.

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

* Re: [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite
  2015-07-21 16:22     ` Wei Liu
@ 2015-07-21 16:33       ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-21 16:33 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

On Tue, 2015-07-21 at 17:22 +0100, Wei Liu wrote:
> On Mon, Jul 13, 2015 at 12:25:35PM +0100, Ian Campbell wrote:
> > On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > > We're interested in xlconfigtest.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > > Cc: Ian Campbell <ian.campbell@citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > > [...]
> > > +             | tee ../libvirt-test-suite-log
> > 
> > Should something be collecting/stashing that log file?
> > 
> 
> Not sure.
> 
> > I think since it is logged to the output of the command it's 
> > probably
> > not needed, but I suppose you added the tee for a reason?
> > 
> 
> I followed suite. There is "tee log" in build command. I can't seem 
> to
> find that log stashed anywhere though.
> 
> What should I do about this?

Given the precedent, I think nothing.

Acked-by: Ian Campbell <ian.campbell@citrix.com>

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

* Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-21 16:32     ` Ian Jackson
@ 2015-07-21 17:12       ` Wei Liu
  2015-07-21 17:36         ` Ian Jackson
  0 siblings, 1 reply; 33+ messages in thread
From: Wei Liu @ 2015-07-21 17:12 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, Ian Campbell

On Tue, Jul 21, 2015 at 05:32:25PM +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables"):
> > On Sun, 2015-07-12 at 17:20 +0100, Wei Liu wrote:
> > > @@ -300,7 +300,9 @@ proc run-job/test-pair {} {
> > >  proc test-guest-migr {g} {
> > > -    if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
> > > +    set to_reap [spawn-ts . = ts-migrate-support-check + host $g]
> > 
> > Most other uses of spawn-ts use [eval spawn-ts <stuff>]. I think those
> > are just trying to expand a $args into multiple arguments to spawn-ts,
> > and hence that isn't needed here (because $g is a singleton argument
> > already). But TBH I don't know...
> 
> Yes, the effect of the
>     set reap [eval spawn-ts $args]
> is to expand the list in $args as arguments to spawn-ts.  $g is a
> singleton as you say, not a list.
> 
> spawn-ts has the same argument convention as run-ts.
> 

Do I need to change anything in this patch? I guess not? It's not very
clear to me.

Wei.

> Ian.

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

* Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-21 17:12       ` Wei Liu
@ 2015-07-21 17:36         ` Ian Jackson
  2015-07-22  9:44           ` Ian Campbell
  0 siblings, 1 reply; 33+ messages in thread
From: Ian Jackson @ 2015-07-21 17:36 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, Ian Campbell

Wei Liu writes ("Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables"):
> Do I need to change anything in this patch? I guess not? It's not very
> clear to me.

Ian C was asking whether the patch (which I wrote) was right, in a
particular respect.  I answered that it is correct.  So no, you don't
need to do anything to this patch.

Ian.

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

* Re: [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables
  2015-07-21 17:36         ` Ian Jackson
@ 2015-07-22  9:44           ` Ian Campbell
  0 siblings, 0 replies; 33+ messages in thread
From: Ian Campbell @ 2015-07-22  9:44 UTC (permalink / raw)
  To: Ian Jackson, Wei Liu; +Cc: Xen-devel

On Tue, 2015-07-21 at 18:36 +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH OSSTEST v2 03/13] osstest migrate support 
> check catch -> variables"):
> > Do I need to change anything in this patch? I guess not? It's not 
> > very
> > clear to me.
> 
> Ian C was asking whether the patch (which I wrote) was right, in a
> particular respect.  I answered that it is correct.  So no, you don't
> need to do anything to this patch.

Right, that question was really address to Ian to confirm my
understanding of how Tcl works...

He's explained and I understood correctly, s:
    Acked-by: Ian Campbell <ian.campbell@citrix.com>

Ian.

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

end of thread, other threads:[~2015-07-22  9:44 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-12 16:20 [PATCH OSSTEST v2 00/13] Libvirt migration and HVM tests Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 01/13] toolstack: save / restore check Wei Liu
2015-07-13 11:09   ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 02/13] Introduce ts-saverestore-support-check Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 03/13] osstest migrate support check catch -> variables Wei Liu
2015-07-13 11:14   ` Ian Campbell
2015-07-21 16:32     ` Ian Jackson
2015-07-21 17:12       ` Wei Liu
2015-07-21 17:36         ` Ian Jackson
2015-07-22  9:44           ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 04/13] toolstack: distinguish local and remote migration support Wei Liu
2015-07-13 11:19   ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 05/13] sg-run-job: remove save/restore dependency on local " Wei Liu
2015-07-13 11:22   ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 06/13] toolstack/libvirt: guest migrate, save and restore support Wei Liu
2015-07-13 11:23   ` Ian Campbell
2015-07-21 16:17     ` Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 07/13] ts-xen-build-prep: install ebtables Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 08/13] ts-libvirt-build: run libvirt test suite Wei Liu
2015-07-13 11:25   ` Ian Campbell
2015-07-21 16:22     ` Wei Liu
2015-07-21 16:33       ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 09/13] ts-debian-hvm-install: stub out libvirt + ovmf / rombios Wei Liu
2015-07-13 11:27   ` Ian Campbell
2015-07-21 16:24     ` Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 10/13] TestSupport: don't put kernel='hvmloader' in HVM config Wei Liu
2015-07-13 11:28   ` Ian Campbell
2015-07-13 11:34     ` Ian Campbell
2015-07-12 16:20 ` [PATCH OSSTEST v2 11/13] make-flight: debian hvm tests with libvirt Wei Liu
2015-07-13 11:33   ` Ian Campbell
2015-07-13 13:12     ` Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 12/13] make-flight, mfi-common: rename onetoolstack to pairtoolstack Wei Liu
2015-07-12 16:20 ` [PATCH OSSTEST v2 13/13] make-flight, mfi-common: create live migration test for libvirt Wei Liu

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).