summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-06-16 12:44:38 +0100
committerDavid Mitchell <davem@iabyn.com>2011-06-16 12:45:41 +0100
commit1d0853ff6185fc3afa05d46bbcf0889abd10adec (patch)
tree179b55bab48db36ac66f5a37f91c69b0757c57a7 /t
parent1f8e94566ebcc1e3986ae739be090e946f26f96e (diff)
downloadperl-1d0853ff6185fc3afa05d46bbcf0889abd10adec.tar.gz
revert recent changes to eintr.t
Revert "[perl #92828] eintr.t hangs on FreeBSD" This reverts commit 6e59d93aee950461947904b4f24a7f52c6c85f58. Revert "eintr.t: skip based on capability rather than OS" This reverts commit df375c6d048b938ecdeaecc7b264a7f1a190120a. My attempt to skip based on capability hung freebsd, and my attempt to fix that failed. Give up for now.
Diffstat (limited to 't')
-rw-r--r--t/io/eintr.t70
1 files changed, 10 insertions, 60 deletions
diff --git a/t/io/eintr.t b/t/io/eintr.t
index a36b4275df..e545228f97 100644
--- a/t/io/eintr.t
+++ b/t/io/eintr.t
@@ -40,73 +40,23 @@ if (exists $ENV{PERLIO} && $ENV{PERLIO} =~ /stdio/ ) {
exit 0;
}
-# Determine whether this platform seems to support interruptible syscalls.
-#
# on Win32, alarm() won't interrupt the read/write call.
# Similar issues with VMS.
# On FreeBSD, writes to pipes of 8192 bytes or more use a mechanism
# that is not interruptible (see perl #85842 and #84688).
# "close during print" also hangs on Solaris 8 (but not 10 or 11).
-
-{
- my $pipe;
- note("checking for read interruptibility...");
- my $pid = eval { open($pipe, '-|') };
- unless (defined $pid) {
- skip_all("can't do -| open");
- exit 0;
- }
- unless ($pid) {
- #child
- sleep 3;
- close $pipe;
- exit 0;
- }
-
- # parent
-
- my $intr = 0;
- $SIG{ALRM} = sub { $intr = 1 };
- alarm(1);
-
- my $x = <$pipe>;
-
- unless ($intr) {
- skip_all("reads aren't interruptible");
- exit 0;
- }
- alarm(0);
-
- $SIG{PIPE} = 'IGNORE';
-
- note("checking for write interruptibility...");
- $pid = eval { open($pipe, '|-') };
- unless (defined $pid) {
- skip_all("can't do |- open");
- exit 0;
- }
- unless ($pid) {
- #child
- sleep 3;
- close $pipe;
- exit 0;
- }
-
- # parent
-
- $intr = 0;
- my $buf = "a" x 1_000_000 . "\n"; # bigger than any pipe buffer hopefully
- alarm(1);
- $x = print $pipe $buf;
-
- unless ($intr) {
- skip_all("writes aren't interruptible");
- exit 0;
- }
- alarm(0);
+#
+# Also skip on release builds, to avoid other possibly problematic
+# platforms
+
+if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'freebsd' ||
+ ($^O eq 'solaris' && $Config{osvers} eq '2.8')
+ || ((int($]*1000) & 1) == 0)
+) {
+ skip_all('various portability issues');
+ exit 0;
}
-
my ($in, $out, $st, $sigst, $buf);
plan(tests => 10);