This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
darwin was failing this test under PERLIO=stdio
authorTony Cook <tony@develop-help.com>
Wed, 13 Jul 2016 01:52:52 +0000 (11:52 +1000)
committerTony Cook <tony@develop-help.com>
Wed, 13 Jul 2016 02:00:51 +0000 (12:00 +1000)
fdopen() on darwin seems to set errno to 2 (ENOENT) when it runs out of
FILE entries.

t/io/socket.t

index 54e4438..bba7f91 100644 (file)
@@ -132,6 +132,10 @@ SKIP:
 {
     eval { require Errno; defined &Errno::EMFILE }
       or skip "Can't load Errno or EMFILE not defined", 1;
+    # stdio might return strange values in errno if it runs
+    # out of FILE entries, and does on darwin
+    $^O eq "darwin" && exists $ENV{PERLIO} && $ENV{PERLIO} =~ /stdio/
+      and skip "errno values from stdio are unspecified", 1;
     my @socks;
     my $sock_limit = 1000; # don't consume every file in the system
     # Default limits on various systems I have: