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
This commit is contained in:
parent
3f1702517c
commit
2b13108d56
@ -0,0 +1,121 @@
|
|||||||
|
From e96b1c9e394011de4ee181cfa42b8021796bf7d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steffen Ullrich <Steffen_Ullrich@genua.de>
|
||||||
|
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ř <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -1,3 +1,2 @@
|
|||||||
---
|
|
||||||
patches:
|
patches:
|
||||||
ignore_requires: Mozilla::CA
|
ignore_requires: Mozilla::CA
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 1 11:28:32 UTC 2018 - Vítězslav Čížek <vcizek@suse.com>
|
||||||
|
|
||||||
|
- 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 <coolo@suse.com>
|
Wed Sep 19 05:27:59 UTC 2018 - Stephan Kulow <coolo@suse.com>
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ Group: Development/Libraries/Perl
|
|||||||
Url: https://metacpan.org/release/%{cpan_name}
|
Url: https://metacpan.org/release/%{cpan_name}
|
||||||
Source0: https://cpan.metacpan.org/authors/id/S/SU/SULLR/%{cpan_name}-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/S/SU/SULLR/%{cpan_name}-%{version}.tar.gz
|
||||||
Source1: cpanspec.yml
|
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
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
@ -77,6 +79,7 @@ Additional documentation can be found in
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user