From 3b62ac53d09a2e39ae8db596856d2aa192171d27 Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Mon, 21 Oct 2019 18:40:01 +0200 Subject: dev-perl/IO-Event: Add patch by Niko Tyni to fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/659600 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Andreas K. Hüttel --- dev-perl/IO-Event/IO-Event-0.813.0-r1.ebuild | 4 ++- .../files/IO-Event-0.813.0-forked2.t.patch | 35 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 dev-perl/IO-Event/files/IO-Event-0.813.0-forked2.t.patch (limited to 'dev-perl') diff --git a/dev-perl/IO-Event/IO-Event-0.813.0-r1.ebuild b/dev-perl/IO-Event/IO-Event-0.813.0-r1.ebuild index c8d60026e907..47bc74acf357 100644 --- a/dev-perl/IO-Event/IO-Event-0.813.0-r1.ebuild +++ b/dev-perl/IO-Event/IO-Event-0.813.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -21,3 +21,5 @@ RDEPEND=" virtual/perl-Time-HiRes " DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/${P}-forked2.t.patch" ) diff --git a/dev-perl/IO-Event/files/IO-Event-0.813.0-forked2.t.patch b/dev-perl/IO-Event/files/IO-Event-0.813.0-forked2.t.patch new file mode 100644 index 000000000000..0691b51eeff1 --- /dev/null +++ b/dev-perl/IO-Event/files/IO-Event-0.813.0-forked2.t.patch @@ -0,0 +1,35 @@ +From e11dc91080151bb59d73e72c3c0a3409c1b999ef Mon Sep 17 00:00:00 2001 +From: Niko Tyni +Date: Sat, 12 Dec 2015 11:33:34 +0200 +Subject: [PATCH] Fix undeterministic test failures in t/forked2.t + +The parent process may get both the eof event from an old connection +and the connect event from a new connection at the same time, and in an +unpredictable order. If the connect event comes first, the handler may +decrement the test counter to zero and make the eof handler think the +testing is already over. + +Having the child synchronize on the eof event before making a new +connection fixes this race. + +Bug-Debian: https://bugs.debian.org/730908 +Bug: https://rt.cpan.org/Ticket/Display.html?id=92200 +--- + t/forked.tt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/t/forked.tt b/t/forked.tt +index e56c7fa..0d9ce18 100755 +--- a/t/forked.tt ++++ b/t/forked.tt +@@ -265,6 +265,7 @@ if ($child = fork()) { + } + print "# CHILD closing\n"; + close($s); ++ syncto("e"); + } + } else { + die "fork: $!"; +-- +2.6.2 + -- cgit v1.2.3-65-gdbad