From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST] Do not attempt migration tests if the platform doesn't support it Date: Wed, 12 Feb 2014 14:32:58 +0000 Message-ID: <1392215578-27239-1-git-send-email-ian.campbell@citrix.com> References: <1392215257-26993-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1392215257-26993-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , george.dunlap@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 --- 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 . + +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