From 87eac11faab098252826af70c361d876bcc265ef Mon Sep 17 00:00:00 2001 From: Roy Cai Date: Wed, 10 Jul 2024 09:41:37 +0800 Subject: [PATCH] Add softfailure for bug: 1221812 Progress ticket: https://progress.opensuse.org/issues/163415 Bug: https://bugzilla.suse.com/show_bug.cgi?id=1221812 --- lib/parallel_guest_migration_base.pm | 24 +++++++++++++++++++ .../parallel_guest_migration_destination.pm | 5 ++++ .../parallel_guest_migration_source.pm | 5 ++++ 3 files changed, 34 insertions(+) diff --git a/lib/parallel_guest_migration_base.pm b/lib/parallel_guest_migration_base.pm index 7e389d0256fe..c79d8b3e5d5a 100644 --- a/lib/parallel_guest_migration_base.pm +++ b/lib/parallel_guest_migration_base.pm @@ -697,6 +697,10 @@ sub initialize_test_result { $self->set_test_run_progress; my @_guest_migration_test = split(/,/, get_var('GUEST_MIGRATION_TEST', '')); + # Remove 'virsh_live_native_p2p_manual_postcopy' if present and record a soft failure + if (is_sle('=15-sp6')) { + @_guest_migration_test = $self->filter_migration_tests(@_guest_migration_test); + } my $_full_test_matrix = is_kvm_host ? $parallel_guest_migration_base::guest_migration_matrix{kvm} : $parallel_guest_migration_base::guest_migration_matrix{xen}; @_guest_migration_test = keys(%$_full_test_matrix) if (scalar @_guest_migration_test == 0); my $_localip = get_required_var('LOCAL_IPADDR'); @@ -1750,6 +1754,26 @@ sub check_peer_test_run { return $_peer_test_run_result; } +=head2 filter_migration_tests + +Filters migration tests based on specified criteria. + +=cut + +sub filter_migration_tests { + my ($self, @migration_tests) = @_; + my @guest_migration_test; + + foreach my $migration_criteria (@migration_tests) { + if ($migration_criteria eq 'virsh_live_native_p2p_manual_postcopy') { + record_soft_failure('bsc#1221812 - qemu coredump when virsh migrate postcopy + virsh migrate-postcopy on sle15sp6 kvm host.'); + } else { + push @guest_migration_test, $migration_criteria; + } + } + return @guest_migration_test; +} + =head2 post_fail_hook Set TEST_RUN_RESULT to FAILED, create junit log and collect logs. diff --git a/tests/virt_autotest/parallel_guest_migration_destination.pm b/tests/virt_autotest/parallel_guest_migration_destination.pm index 31390bea4427..a2ad40271fc1 100644 --- a/tests/virt_autotest/parallel_guest_migration_destination.pm +++ b/tests/virt_autotest/parallel_guest_migration_destination.pm @@ -41,6 +41,7 @@ use mmapi; use virt_autotest::utils qw(is_kvm_host is_xen_host check_host_health check_guest_health is_fv_guest is_pv_guest add_guest_to_hosts); use virt_utils qw(collect_host_and_guest_logs cleanup_host_and_guest_logs enable_debug_logging); use virt_autotest::domain_management_utils qw(construct_uri create_guest remove_guest shutdown_guest show_guest check_guest_state); +use version_utils qw(is_sle); =head2 run_test @@ -133,6 +134,10 @@ sub guest_migration_test { $self->set_test_run_progress; my @guest_migration_test = split(/,/, get_var('GUEST_MIGRATION_TEST')); + # Remove 'virsh_live_native_p2p_manual_postcopy' if present and record a soft failure + if (is_sle('=15-sp6')) { + @guest_migration_test = $self->filter_migration_tests(@guest_migration_test); + } my $full_test_matrix = is_kvm_host ? $parallel_guest_migration_base::guest_migration_matrix{kvm} : $parallel_guest_migration_base::guest_migration_matrix{xen}; @guest_migration_test = keys(%$full_test_matrix) if (scalar @guest_migration_test == 0); my $localip = get_required_var('LOCAL_IPADDR'); diff --git a/tests/virt_autotest/parallel_guest_migration_source.pm b/tests/virt_autotest/parallel_guest_migration_source.pm index 50f6de567494..33154a98af78 100644 --- a/tests/virt_autotest/parallel_guest_migration_source.pm +++ b/tests/virt_autotest/parallel_guest_migration_source.pm @@ -42,6 +42,7 @@ use virt_autotest::utils qw(is_kvm_host is_xen_host check_host_health check_gues use virt_utils qw(collect_host_and_guest_logs cleanup_host_and_guest_logs enable_debug_logging); use utils qw(script_retry); use virt_autotest::domain_management_utils qw(construct_uri create_guest remove_guest shutdown_guest show_guest check_guest_state); +use version_utils qw(is_sle); =head2 run_test @@ -163,6 +164,10 @@ sub guest_migration_test { $self->set_test_run_progress; my @guest_migration_test = split(/,/, get_var('GUEST_MIGRATION_TEST', '')); + # Remove 'virsh_live_native_p2p_manual_postcopy' if present and record a soft failure + if (is_sle('=15-sp6')) { + @guest_migration_test = $self->filter_migration_tests(@guest_migration_test); + } my $full_test_matrix = is_kvm_host ? $parallel_guest_migration_base::guest_migration_matrix{kvm} : $parallel_guest_migration_base::guest_migration_matrix{xen}; @guest_migration_test = keys(%$full_test_matrix) if (scalar @guest_migration_test == 0); my $localip = get_required_var('LOCAL_IPADDR');