Skip to content

Commit

Permalink
Merge pull request #19568 from alice-suse/alice-migration-base-on-roy-A1
Browse files Browse the repository at this point in the history
Reconstruct MU guest migration test: merge chained tests into combined single testsuite
  • Loading branch information
RoyCai7 authored Jul 22, 2024
2 parents 501261a + 65c0f2c commit f1a74c2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
33 changes: 22 additions & 11 deletions lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2451,19 +2451,19 @@ sub load_hypervisor_tests {

if (check_var('ENABLE_VM_INSTALL', 1)) {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/prepare_guests";
loadtest "virtualization/universal/waitfor_guests";
unless (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
loadtest "virtualization/universal/prepare_guests";
loadtest "virtualization/universal/waitfor_guests";
}
if (check_var('PATCH_WITH_ZYPPER', 1)) {
loadtest "virtualization/universal/patch_and_reboot";
if (my $update_package = get_var('UPDATE_PACKAGE')) {
if ($update_package eq 'kernel-default') {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
loadtest "virtualization/universal/patch_guests";
} elsif ($update_package eq 'xen' || $update_package eq 'qemu') {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
}
if (check_var('UPDATE_PACKAGE', 'kernel-default')) {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests";
loadtest "virtualization/universal/patch_guests";
} elsif (check_var('UPDATE_PACKAGE', 'xen') || check_var('UPDATE_PACKAGE', 'qemu')) {
loadtest "virt_autotest/login_console";
loadtest "virtualization/universal/list_guests" unless (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1'));
}
}
loadtest "virtualization/universal/kernel";
Expand Down Expand Up @@ -2524,6 +2524,17 @@ sub load_hypervisor_tests {
}
# Load ENABLE_SNAPSHOTS at the end
check_and_load_mu_virt_features('ENABLE_SNAPSHOTS', $virt_features{ENABLE_SNAPSHOTS}{modules}, $virt_features{ENABLE_SNAPSHOTS}{hypervisor});

# Guest migration tests
if (check_var('VIRT_NEW_GUEST_MIGRATION_SOURCE', '1')) {
loadtest "virt_autotest/login_console";
loadtest "virt_autotest/parallel_guest_migration_source";
}
if (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
loadtest "virt_autotest/parallel_guest_migration_barrier";
loadtest "virt_autotest/login_console";
loadtest "virt_autotest/parallel_guest_migration_destination";
}
}

sub load_extra_tests_syscontainer {
Expand Down
8 changes: 6 additions & 2 deletions tests/virtualization/universal/patch_and_reboot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ sub run {

if (get_var("UPDATE_PACKAGE") =~ /xen|kernel-default|qemu/) {
script_run("virsh list --all | grep -v Domain-0");
script_retry("nmap $_ -PN -p ssh | grep open", delay => 60, retry => 60) foreach (keys %virt_autotest::common::guests);
unless (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
script_retry("nmap $_ -PN -p ssh | grep open", delay => 60, retry => 60) foreach (keys %virt_autotest::common::guests);
}
script_run '( sleep 15 && reboot & )';
save_screenshot;
switch_from_ssh_to_sol_console(reset_console_flag => 'on');
Expand All @@ -39,7 +41,9 @@ sub run {
restart_libvirtd;
script_run("virsh list --all | grep -v Domain-0");
# Check that all guests are still running
script_retry("nmap $_ -PN -p ssh | grep open", delay => 60, retry => 60) foreach (keys %virt_autotest::common::guests);
unless (check_var('VIRT_NEW_GUEST_MIGRATION_DST', '1')) {
script_retry("nmap $_ -PN -p ssh | grep open", delay => 60, retry => 60) foreach (keys %virt_autotest::common::guests);
}
}
}
sub post_run_hook {
Expand Down

0 comments on commit f1a74c2

Please sign in to comment.