In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1e02895ff34c407637067df12a1b06eb07a5a96a?hp=c7b2fb96dcace6e3cbac79dfe4c82984e1f7fd3d>

- Log -----------------------------------------------------------------
commit 1e02895ff34c407637067df12a1b06eb07a5a96a
Author: Ævar Arnfjörð Bjarmason <[email protected]>
Date:   Tue Oct 7 19:57:59 2014 +0000

    t/io/eintr.t: Make this pass on my ppc64 box
    
    See the "Test failures in blead on ppc64" thread on perl5-porters for
    details. I'd fail on the previous value, this passes every time.
-----------------------------------------------------------------------

Summary of changes:
 t/io/eintr.t | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/t/io/eintr.t b/t/io/eintr.t
index 9ea9cc7..32f109d 100644
--- a/t/io/eintr.t
+++ b/t/io/eintr.t
@@ -95,11 +95,16 @@ alarm(0);
 ok(!$st, 'read/die: read status');
 ok(close($in), 'read/die: close status');
 
+# This used to be 1_000_000, but on Linux/ppc64 (POWER7) this kept
+# consistently failing. At exactly 0x100000 it started passing
+# again. We're hoping this number is bigger than any pipe buffer.
+my $surely_this_arbitrary_number_is_fine = 0x100000;
+
 # close during print
 
 fresh_io;
 $SIG{ALRM} = sub { $sigst = close($out) ? "ok" : "nok" };
-$buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully
+$buf = "a" x $surely_this_arbitrary_number_is_fine . "\n";
 select $out; $| = 1; select STDOUT;
 alarm(1);
 $st = print $out $buf;
@@ -112,7 +117,7 @@ ok(!close($out), 'print/close: close status');
 
 fresh_io;
 $SIG{ALRM} = sub { die };
-$buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully
+$buf = "a" x $surely_this_arbitrary_number_is_fine . "\n";
 select $out; $| = 1; select STDOUT;
 alarm(1);
 $st = eval { print $out $buf };

--
Perl5 Master Repository

Reply via email to