Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconstruct MU guest migration test: merge chained tests into combined single testsuite #19568

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading