From 60d57c688444600942c9fd8b464bd5e0ef286266 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 23 Oct 2021 14:25:51 +0200 Subject: Skip rpm-v3 tests on known broken versions of rpm We know that 4.15.1.1 & 4.16.1.3 had a bad regression regarding handling old rpm v3 packages. See https://github.com/rpm-software-management/rpm/issues/1635 So just skip those tests on affected CPAN smokers. Eg: http://www.cpantesters.org/cpan/report/db1b368e-c68b-11eb-8660-be641f24ea8f error: [fd 10]: invalid signature tag Archivesize (1046) bad rpm media/rpm-v3_no_subdir/libtermcap-2.0.8-2.i386.rpm Failed test 'genhdlist2 --xml-info media/rpm-v3_no_subdir' at t/helper.pm line 151. --- t/02create_pkgs.t | 2 +- t/helper.pm | 5 ++++- t/superuser--media_info_dir.t | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t index 65eec471..7bd625f3 100644 --- a/t/02create_pkgs.t +++ b/t/02create_pkgs.t @@ -65,7 +65,7 @@ foreach my $spec (glob("data/SPECS/srpm*.spec")) { genhdlist_std($name); } -{ +if (!is_rpm_v3_support_broken()) { my $name = 'rpm-v3'; system_("cp -r data/$name media"); system_("cp -r media/$name media/${name}_nohdlist"); diff --git a/t/helper.pm b/t/helper.pm index 74e0eb07..30f1768c 100644 --- a/t/helper.pm +++ b/t/helper.pm @@ -7,7 +7,7 @@ use urpm::select; use urpm::util; use base 'Exporter'; our @EXPORT = qw(need_root_and_prepare need_downloader - are_weak_deps_supported is_mageia + are_weak_deps_supported is_mageia is_rpm_v3_support_broken start_httpd httpd_port urpmi_addmedia urpmi_addmedia_should_retry urpmi_removemedia urpmi_update urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme @@ -217,6 +217,9 @@ sub is_mageia() { sub are_weak_deps_supported() { return urpm::select::_rpm_version() gt 4.12.0; } +sub is_rpm_v3_support_broken() { + return member(urpm::select::_rpm_version(), qw(4.15.1.1 4.16.1.3)); +} END { $using_root and system('rm -rf root'); diff --git a/t/superuser--media_info_dir.t b/t/superuser--media_info_dir.t index d2575b0a..56bdc1c5 100644 --- a/t/superuser--media_info_dir.t +++ b/t/superuser--media_info_dir.t @@ -11,7 +11,7 @@ need_root_and_prepare(); various(); urpmq_various(); urpmi_force_skip_unknown(); -rpm_v3(); +rpm_v3() if !is_rpm_v3_support_broken(); sub various { my $name = 'various'; -- cgit v1.2.1