xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>,
	george.dunlap@citrix.com, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST] Do not attempt migration tests if the platform doesn't support it
Date: Wed, 12 Feb 2014 14:32:58 +0000	[thread overview]
Message-ID: <1392215578-27239-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1392215257-26993-1-git-send-email-ian.campbell@citrix.com>

Doing so blocks the rest of the tests in the job, which may be able to
indepentently complete. So arrange for a ts-migrate-support-check test to run
and gate the remaining migration tests on that.

This relies on the xen patch "xl: suppress suspend/resume functions on
platforms which do not support it" to actually suppress migration support on
arm.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
This needs to go in after the Xen patch. Otherwise this new step will appear to
pass and then start to fail when the Xen patch is applied.
---
 sg-run-job               |  8 +++++++-
 ts-migrate-support-check | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100755 ts-migrate-support-check

diff --git a/sg-run-job b/sg-run-job
index db62365..d894711 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -281,12 +281,18 @@ proc run-job/test-pair {} {
 #    run-ts . remus-failover ts-remus-check         src_host dst_host + debian
 }
 
-proc test-guest {g} {
+proc test-guest-migr {g} {
+    if {[catch { run-ts . = ts-migrate-support-check + host $g }]} return
+
     foreach iteration {{} .2} {
         run-ts . =$iteration ts-guest-saverestore + host $g
         run-ts . =$iteration ts-guest-localmigrate + host $g
     }
     run-ts . = ts-guest-localmigrate x10 + host $g
+}
+
+proc test-guest {g} {
+    test-guest-migr $g
     test-guest-nomigr $g
 }
 
diff --git a/ts-migrate-support-check b/ts-migrate-support-check
new file mode 100755
index 0000000..ffae1b3
--- /dev/null
+++ b/ts-migrate-support-check
@@ -0,0 +1,35 @@
+#!/usr/bin/perl -w
+# 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/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+our $ho = selecthost($ARGV[0]);
+
+# all xend/xm platforms support migration
+exit(0) if toolstack()->{Command} eq "xm";
+
+my $help = target_cmd_output_root($ho, toolstack()->{Command}." help");
+
+my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
+
+logm("rc=$rc");
+exit($rc);
-- 
1.8.5.2

  parent reply	other threads:[~2014-02-12 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 14:27 [PATCH] xl: suppress suspend/resume functions on platforms which do not support it Ian Campbell
2014-02-12 14:32 ` Ian Campbell
2014-02-12 14:54   ` Ian Jackson
2014-02-13  9:19     ` Ian Campbell
2014-02-14  5:42     ` Lai Jiangshan
2014-02-18  9:57       ` Ian Campbell
2014-02-12 16:48   ` George Dunlap
2014-02-12 14:32 ` Ian Campbell [this message]
2014-02-12 14:58   ` [PATCH OSSTEST] Do not attempt migration tests if the platform doesn't " Ian Jackson
2014-02-12 15:21 ` [PATCH] xl: suppress suspend/resume functions on platforms which do not " Olaf Hering
2014-02-12 15:57   ` Ian Campbell
2014-02-12 16:49     ` George Dunlap
2014-02-12 16:54       ` Ian Campbell
2014-02-12 17:00         ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392215578-27239-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).