osstest is the system which does the Xen.org automatic tests of Xen. The push gates, which try to prevent important regressions from reaching the main stable and evelopment trees, are managed by osstest. In this talk I will give a brief overview of the system, focussed on how to add new tests.
4. ts−guest−migrate
Printed by Ian Jackson
Page 1/1
#!/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
use
use
use
strict qw(vars);
DBI;
Osstest;
Osstest::TestSupport;
our %timeout= qw(Migrate
400);
tsreadconfig();
our $sho = selecthost($ARGV[0]);
our $dho = selecthost($ARGV[1]);
our $gho = selectguest($ARGV[2],$sho);
sub migrate () {
guest_checkrunning($sho,$gho) or die $gho−>{Name};
my $err= guest_check_ip($gho); die "$err $gho−>{Name}" if defined $err;
target_cmd_root($sho,
toolstack()−>{Command}
." migrate $gho−>{Name} $dho−>{Name}",
$timeout{Migrate});
}
guest_await_dhcp_tcp($gho, 5);
guest_check_up($gho);
migrate();
guest_check_up($gho);
ts−guest−migrate
1/1