Subject: | test failure 9999.04 due to unsupported socketpair() |
I have found that "make test" for File-Slurp-9999.04 fails in
my Windows machine (ActivePerl 5.6.1) with the following
relevant messages:
t\handle......ok 2/6Unsupported socket function "socketpair" called at t\handle.t line 42, <DATA> line 11.
# Looks like you planned 6 tests but only ran 2.
# Looks like your test died just after 2.
t\handle......dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-6
Failed 4/6 tests, 33.33% okay
This is because the test script "t/handle.t" uses the function
"socketpair()" which is not supported in Win32 implementations.
That can be determined by
use Config;
print "socketpair() supported" if $Config{d_sockpair};
Then the attached patch over "t/handle.t" skips these tests
if the Perl port does not support "socketpair()".
This test bug has been reported before. Sorry if I insist on this: maybe the patch can help.
--- handle.t 2004-02-27 23:34:02.000000000 -0300
+++ handle1.t 2004-02-27 23:35:36.000000000 -0300
@@ -8,6 +8,8 @@
use Symbol ;
use Test::More ;
+use Config;
+
my @pipe_data = (
'',
'abc',
@@ -26,7 +28,11 @@
#test_fork_pipe_slurp() ;
-test_socketpair_slurp() ;
+SKIP : {
+ skip "socketpair() unsupported", scalar @pipe_data
+ unless $Config{d_sockpair};
+ test_socketpair_slurp() ;
+}
exit ;