CC: | Steve Hay <steve.m.hay [...] googlemail.com> |
Subject: | "issues" with tests for IO-Socket-IP and AIX 5.3 - basic PATCH included |
Date: | Sun, 31 Aug 2014 22:32:48 +0200 |
To: | bug-IO-Socket-IP [...] rt.cpan.org |
From: | Michael Felt <aixtools [...] gmail.com> |
AIX 5.3 - which is frozen in time, and likely the bug is in AIX, fails
three tests consistently.
Basically, when creating a new socket and the LocalPort is not defined
(zero being assummed, and a local port is to be assigned) the calls fail on
AIX 5.3 (These tests pass on AIX 6.1 and AIX 7.1).
I do not see it as a bug in the perl code - the assumption is that
LocalPort is zero. I am assuming the code is using "buffer" from the stack,
rather than a malloc. However on AIX 5.3, for whatever reason, this
assumption is not working (the test passes on AIX 6.1 and AIX 7.1).
It may be that the weakness is in AIX - which will never be updated.
However, the current status of the tests causes Test::SMOKE to always
report a failure when, basically, perl is passing all tests. It would be
great if you at least added or adapted the follwing patch so that AIX 5.3
will pass t/TEST
Many thanks!
PATCH========
root@lp01:[/data/smoker/perl-
current]diff -u cpan/IO-Socket-IP/t.orig cpan/IO-Socket-IP/t
diff -u cpan/IO-Socket-IP/t.orig/02local-server-v4.t cpan/IO-Socket-IP
/t/02local-server-v4.t
--- cpan/IO-Socket-IP/t.orig/02local-server-v4.t 2014-08-26
10:46:16.000000000 +0000
+++ cpan/IO-Socket-IP/t/02local-server-v4.t 2014-08-26
10:47:33.000000000 +0000
@@ -27,6 +27,7 @@
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "127.0.0.1",
+ LocalPort => 0,
Type => Socket->$socktype,
);
diff -u cpan/IO-Socket-IP/t.orig/03local-cross-v4.t cpan/IO-Socket-IP
/t/03local-cross-v4.t
--- cpan/IO-Socket-IP/t.orig/03local-cross-v4.t 2014-08-26
10:46:16.000000000 +0000
+++ cpan/IO-Socket-IP/t/03local-cross-v4.t 2014-08-26
10:47:48.000000000 +0000
@@ -11,6 +11,7 @@
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "127.0.0.1",
+ LocalPort => 0,
Type => Socket->$socktype,
) or die "Cannot listen on PF_INET - $@";
diff -u cpan/IO-Socket-IP/t.orig/05local-server-v6.t cpan/IO-Socket-IP
/t/05local-server-v6.t
--- cpan/IO-Socket-IP/t.orig/05local-server-v6.t 2014-08-26
10:46:16.000000000 +0000
+++ cpan/IO-Socket-IP/t/05local-server-v6.t 2014-08-26
10:48:18.000000000 +0000
@@ -33,6 +33,7 @@
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "::1",
+ LocalPort => 0,
Type => Socket->$socktype,
GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG
);
diff -u cpan/IO-Socket-IP/t.orig/06local-cross-v6.t cpan/IO-Socket-IP
/t/06local-cross-v6.t
--- cpan/IO-Socket-IP/t.orig/06local-cross-v6.t 2014-08-26
10:46:16.000000000 +0000
+++ cpan/IO-Socket-IP/t/06local-cross-v6.t 2014-08-26
10:48:31.000000000 +0000
@@ -14,6 +14,7 @@
my $testserver = IO::Socket::IP->new(
( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
LocalHost => "::1",
+ LocalPort => 0,
Type => Socket->$socktype,
) or die "Cannot listen on PF_INET6 - $@";