[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[PATCH] 5.8.x on Interix
I just built 5.8.x@34432 under Interix on WinXP, and got the following
failures. All of these occur with 5.8.8 as well, so they aren't
regressions. This patch fixes those with obvious fixes.
../lib/Tie/File/t/14_lock.t
The test script calls flock(STDOUT, 0) which, if STDOUT is a pipe,
causes the script to hang on exit. I replaced it with LOCK_UN, which
doesn't, but this may cause problems on platforms that don't have
LOCK_UN.
../ext/IO/t/io_sock.t
The test is writing to a socket after the other end has been closed,
and Interix is immediately killing the process with SIGPIPE. Other
OSes apparently allow a small amount of grace in this regard :).
../ext/NDBM_File/t/ndbm.t
I don't have ndbm (or a libndbm from gdbm), but the extension seems
quite happy to build without it. The test fails with a link error as
soon as it tries to load the module. Is this expected on a system
without ndbm?
../ext/POSIX/t/math.t
frexp(3) returns completely incorrect results: I can't imagine why,
since Win32 manages to get it right. Since this is an Interix bug
rather than a perl bug I've just skipped the test.
../ext/Socket/t/socketpair.t
Unix-domain sockets are not supported, and calling eof on a shutdown
socket makes the process hang, so I added Interix to the list of
skipped OSen in each case.
../lib/Memoize/t/tie_gdbm.t
$ENV{TMP} is typically set to the Windows path to a temporary
directory, and is not useful. It may be better to go through all
these and use File::Spec->tmpdir, but I was trying to make minimal
changes.
../lib/Net/Ping/t/450_service.t
Interix doesn't respond to TCP or SYN pings on closed TCP ports, so
I marked the tests TODO as for Win32 and HP-UX.
../lib/Net/hostent.t
Interix, like Win32, returns the hostname when asked to name
127.0.0.1.
op/groups.t
This is just a mess. AFAICT the test is trying to build a
space-separated list of just the supplementary groups, but Windows
groups with spaces in the names are confusing it. The only sane fix
would be to rewrite the test to use arrays of group names instead,
but that doesn't work on systems where `groups` or `id -Gn` is used
and there might be spaces in the names, so I don't know the right
answer.
op/sprintf.t
Interix, like Win32, sprintfs -0.0 as 0 rather than -0.
Ben
--
Many users now operate their own computers day in and day out on various
applications without ever writing a program. Indeed, many of these users
cannot write new programs for their machines...
-- F.P. Brooks, 'No Silver Bullet', 1987 [ben@morrow.me.uk]
diff -ur perl-5.8.x/ext/IO/t/io_sock.t perl-5.8.x-interix/ext/IO/t/io_sock.t
--- perl-5.8.x/ext/IO/t/io_sock.t Fri Sep 19 22:03:46 2008
+++ perl-5.8.x-interix/ext/IO/t/io_sock.t Mon Sep 29 20:18:39 2008
@@ -252,7 +252,6 @@
push( @array, $_);
}
- $sock->print("done\n");
$sock->close;
print "not " if( @array != @data);
@@ -313,7 +312,6 @@
}
}
- $sock->print("done\n");
$sock->close;
print "not " if( @array != @data);
diff -ur perl-5.8.x/ext/POSIX/t/math.t perl-5.8.x-interix/ext/POSIX/t/math.t
--- perl-5.8.x/ext/POSIX/t/math.t Fri Sep 19 22:03:46 2008
+++ perl-5.8.x-interix/ext/POSIX/t/math.t Sun Sep 28 08:34:11 2008
@@ -15,7 +15,10 @@
is(cosh(0), 1, "Basic cosh(0) test");
is(floor(1.23441242), 1, "Basic floor(1.23441242) test");
is(fmod(3.5, 2.0), 1.5, "Basic fmod(3.5, 2.0) test");
-is(join(" ", frexp(1)), "0.5 1", "Basic frexp(1) test");
+SKIP: {
+ skip("frexp(3) is broken on Interix", 1) if $^O eq 'interix';
+ is(join(" ", frexp(1)), "0.5 1", "Basic frexp(1) test");
+}
is(ldexp(0,1), 0, "Basic ldexp(0,1) test");
is(log10(1), 0, "Basic log10(1) test");
is(log10(10), 1, "Basic log10(10) test");
diff -ur perl-5.8.x/ext/Socket/t/socketpair.t perl-5.8.x-interix/ext/Socket/t/socketpair.t
--- perl-5.8.x/ext/Socket/t/socketpair.t Fri Sep 19 22:03:47 2008
+++ perl-5.8.x-interix/ext/Socket/t/socketpair.t Sun Sep 28 08:53:39 2008
@@ -115,6 +115,7 @@
# Calls. Hence the child process minder.
SKIP: {
skip "SCO Unixware / OSR have a bug with shutdown",2 if $^O =~ /^(?:svr|sco)/;
+ skip "Interix has a bug with shutdown",2 if $^O eq 'interix';
local $SIG{ALRM} = sub { warn "EOF on right took over 3 seconds" };
local $TODO = "Known problems with unix sockets on $^O"
if $^O eq 'hpux' || $^O eq 'super-ux';
@@ -169,7 +170,8 @@
# guarantee that the stack won't drop a UDP packet, even if it is for localhost.
SKIP: {
- skip "No usable SOCK_DGRAM for socketpair", 24 if ($^O =~ /^(MSWin32|os2)\z/);
+ skip "No usable SOCK_DGRAM for socketpair", 24
+ if ($^O =~ /^(MSWin32|os2|interix)\z/);
local $TODO = "socketpair not supported on $^O" if $^O eq 'nto';
ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC),
diff -ur perl-5.8.x/lib/Memoize/t/tie_gdbm.t perl-5.8.x-interix/lib/Memoize/t/tie_gdbm.t
--- perl-5.8.x/lib/Memoize/t/tie_gdbm.t Fri Sep 19 22:03:49 2008
+++ perl-5.8.x-interix/lib/Memoize/t/tie_gdbm.t Sun Sep 28 07:44:44 2008
@@ -31,7 +31,7 @@
} else {
*catfile = sub { join '/', @_ };
}
-$tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp';
+($tmpdir) = grep defined && -d, $ENV{TMP}, $ENV{TMPDIR}, '/tmp';
$file = catfile($tmpdir, "md$$");
1 while unlink $file, "$file.dir", "$file.pag";
tryout('GDBM_File', $file, 1); # Test 1..4
diff -ur perl-5.8.x/lib/Net/Ping/t/450_service.t perl-5.8.x-interix/lib/Net/Ping/t/450_service.t
--- perl-5.8.x/lib/Net/Ping/t/450_service.t Fri Sep 19 22:03:49 2008
+++ perl-5.8.x-interix/lib/Net/Ping/t/450_service.t Mon Sep 29 20:29:55 2008
@@ -20,7 +20,8 @@
# all that direct socket() junk manually.
plan tests => 26, ($^O eq 'MSWin32' ? (todo => [18]) :
- $^O eq "hpux" ? (todo => [9, 18]) : ());
+ $^O eq "hpux" ? (todo => [9, 18]) :
+ $^O eq "interix" ? (todo => [9, 18]) : ());
# Everything loaded fine
ok 1;
diff -ur perl-5.8.x/lib/Net/hostent.t perl-5.8.x-interix/lib/Net/hostent.t
--- perl-5.8.x/lib/Net/hostent.t Fri Sep 19 22:03:49 2008
+++ perl-5.8.x-interix/lib/Net/hostent.t Sun Sep 28 08:57:05 2008
@@ -53,7 +53,7 @@
SKIP: {
skip "Windows will return the machine name instead of 'localhost'", 2
- if $^O eq 'MSWin32' or $^O eq 'NetWare' or $^O eq 'cygwin';
+ if $^O =~ /MSWin32|NetWare|cygwin|interix/;
print "# name = " . $h->name . ", aliases = " . join (",", @{$h->aliases}) . "\n";
diff -ur perl-5.8.x/lib/Tie/File/t/14_lock.t perl-5.8.x-interix/lib/Tie/File/t/14_lock.t
--- perl-5.8.x/lib/Tie/File/t/14_lock.t Fri Sep 19 22:03:50 2008
+++ perl-5.8.x-interix/lib/Tie/File/t/14_lock.t Sun Sep 28 08:24:07 2008
@@ -8,15 +8,15 @@
# portable test for flocking. I checked the Perl core distribution,
# and found that Perl doesn't test flock either!
+use Fcntl ':flock'; # This works at least back to 5.004_04
+
BEGIN {
- eval { flock STDOUT, 0 };
- if ($@ && $@ =~ /unimplemented/) {
+ eval { flock STDOUT, LOCK_UN() };
+ if ($@ && $@ =~ /unimplemented|Undefined sub/) {
print "1..0\n";
exit;
}
}
-
-use Fcntl ':flock'; # This works at least back to 5.004_04
my $file = "tf$$.txt";
my ($o, $n);
diff -ur perl-5.8.x/t/op/sprintf.t perl-5.8.x-interix/t/op/sprintf.t
--- perl-5.8.x/t/op/sprintf.t Fri Sep 19 22:03:56 2008
+++ perl-5.8.x-interix/t/op/sprintf.t Sun Sep 28 08:59:12 2008
@@ -373,7 +373,7 @@
>%g< >12345.6789< >12345.7<
>%+g< >12345.6789< >+12345.7<
>%#g< >12345.6789< >12345.7<
->%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix darwin<
+>%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix darwin interix<
>%.0g< >12345.6789< >1e+04<
>%#.0g< >12345.6789< >1.e+04<
>%.2g< >12345.6789< >1.2e+04<
- Follow-Ups from:
-
"Jan Dubois" <jand@activestate.com>
"Rafael Garcia-Suarez" <rgarciasuarez@gmail.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]