From 2b13108d566cfff5d72b4fadb36110b39563eb03ffd25f26b43fadb52f010d77 Mon Sep 17 00:00:00 2001 From: Pedro Monreal Gonzalez Date: Tue, 6 Nov 2018 11:51:40 +0000 Subject: [PATCH] Accepting request 646633 from home:vitezslav_cizek:branches:devel:languages:perl - prevent flaky test failures with openssl 1.1.1 on overloaded systems(bsc#1108977) * https://rt.cpan.org/Public/Bug/Display.html?id=126899 * add IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch OBS-URL: https://build.opensuse.org/request/show/646633 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-IO-Socket-SSL?expand=0&rev=110 --- ...hich-use-fork-also-ignore-signal-PIP.patch | 121 ++++++++++++++++++ cpanspec.yml | 1 - perl-IO-Socket-SSL.changes | 8 ++ perl-IO-Socket-SSL.spec | 3 + 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch diff --git a/IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch b/IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch new file mode 100644 index 0000000..3e139a4 --- /dev/null +++ b/IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch @@ -0,0 +1,121 @@ +From e96b1c9e394011de4ee181cfa42b8021796bf7d4 Mon Sep 17 00:00:00 2001 +From: Steffen Ullrich +Date: Mon, 17 Sep 2018 14:09:48 +0200 +Subject: [PATCH] make all tests which use fork also ignore signal PIPE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + t/nonblock.t | 4 +--- + t/protocol_version.t | 2 -- + t/session_ticket.t | 2 -- + t/signal-readline.t | 1 - + t/sni.t | 2 -- + t/sni_verify.t | 2 -- + t/testlib.pl | 2 ++ + 7 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/t/nonblock.t b/t/nonblock.t +index 6c1bc38..ad62799 100644 +--- a/t/nonblock.t ++++ b/t/nonblock.t +@@ -9,7 +9,7 @@ use Net::SSLeay; + use Socket; + use IO::Socket::SSL; + use IO::Select; +-use Errno qw( EWOULDBLOCK EAGAIN EINPROGRESS EPIPE ECONNRESET ); ++use Errno qw( EWOULDBLOCK EAGAIN EINPROGRESS); + do './testlib.pl' || do './t/testlib.pl' || die "no testlib"; + + if ( ! eval "use 5.006; use IO::Select; return 1" ) { +@@ -17,8 +17,6 @@ if ( ! eval "use 5.006; use IO::Select; return 1" ) { + exit; + } + +-$SIG{PIPE} = 'IGNORE'; # use EPIPE not signal handler +- + $|=1; + print "1..27\n"; + +diff --git a/t/protocol_version.t b/t/protocol_version.t +index 2e5cc6f..3577720 100644 +--- a/t/protocol_version.t ++++ b/t/protocol_version.t +@@ -7,8 +7,6 @@ use Socket; + use IO::Socket::SSL; + do './testlib.pl' || do './t/testlib.pl' || die "no testlib"; + +-$SIG{PIPE} = 'IGNORE'; +- + plan skip_all => "Test::More has no done_testing" + if !defined &done_testing; + +diff --git a/t/session_ticket.t b/t/session_ticket.t +index ca70b80..4071b8a 100644 +--- a/t/session_ticket.t ++++ b/t/session_ticket.t +@@ -27,8 +27,6 @@ my ($server_cert,$server_key) = CERT_create( + purpose => { server => 1 } + ); + +-$SIG{PIPE} = 'IGNORE'; +- + # create two servers with the same session ticket callback + my (@server,@saddr); + for (1,2) { +diff --git a/t/signal-readline.t b/t/signal-readline.t +index 6dcd4ae..3e226c0 100644 +--- a/t/signal-readline.t ++++ b/t/signal-readline.t +@@ -50,7 +50,6 @@ if ( $pid == 0 ) { + + my $csock = $server->accept; + ok("accept"); +-$SIG{PIPE} = 'IGNORE'; + + syswrite($csock,"foo") or print "not "; + ok("wrote foo"); +diff --git a/t/sni.t b/t/sni.t +index c6e6510..de0f06e 100644 +--- a/t/sni.t ++++ b/t/sni.t +@@ -17,8 +17,6 @@ if ( ! IO::Socket::SSL->can_client_sni() ) { + exit; + } + +-$SIG{PIPE} = 'IGNORE'; +- + print "1..17\n"; + my $server = IO::Socket::SSL->new( + LocalAddr => '127.0.0.1', +diff --git a/t/sni_verify.t b/t/sni_verify.t +index 86b5dca..b3b299b 100644 +--- a/t/sni_verify.t ++++ b/t/sni_verify.t +@@ -17,8 +17,6 @@ if ( ! IO::Socket::SSL->can_client_sni() ) { + exit; + } + +-$SIG{PIPE} = 'IGNORE'; +- + print "1..17\n"; + my $server = IO::Socket::SSL->new( + LocalAddr => '127.0.0.1', +diff --git a/t/testlib.pl b/t/testlib.pl +index 5a99e49..b3f342c 100644 +--- a/t/testlib.pl ++++ b/t/testlib.pl +@@ -19,6 +19,8 @@ unless ( $Config::Config{d_fork} || $Config::Config{d_pseudofork} || + exit + } + ++# let IO errors result in EPIPE instead of crashing the test ++$SIG{PIPE} = 'IGNORE'; + + # small implementations if not used from Test::More (09_fdleak.t) + if ( ! defined &ok ) { +-- +2.17.1 + diff --git a/cpanspec.yml b/cpanspec.yml index 2451ac6..4d0f3ab 100644 --- a/cpanspec.yml +++ b/cpanspec.yml @@ -1,3 +1,2 @@ ---- patches: ignore_requires: Mozilla::CA diff --git a/perl-IO-Socket-SSL.changes b/perl-IO-Socket-SSL.changes index 9d239b9..8375106 100644 --- a/perl-IO-Socket-SSL.changes +++ b/perl-IO-Socket-SSL.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Nov 1 11:28:32 UTC 2018 - Vítězslav Čížek + +- prevent flaky test failures with openssl 1.1.1 on overloaded + systems(bsc#1108977) + * https://rt.cpan.org/Public/Bug/Display.html?id=126899 + * add IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch + ------------------------------------------------------------------- Wed Sep 19 05:27:59 UTC 2018 - Stephan Kulow diff --git a/perl-IO-Socket-SSL.spec b/perl-IO-Socket-SSL.spec index 54624a9..399ebf4 100644 --- a/perl-IO-Socket-SSL.spec +++ b/perl-IO-Socket-SSL.spec @@ -26,6 +26,8 @@ Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/S/SU/SULLR/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +# Prevent tests from dying on SIGPIPE, CPAN RT#126899 +Patch0: IO-Socket-SSL-2.060-make-all-tests-which-use-fork-also-ignore-signal-PIP.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl @@ -77,6 +79,7 @@ Additional documentation can be found in %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build