This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id:
83485
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
kmx [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.18
Fixed in:
  • 0.19_001
  • 0.20



Subject: v0.18 Win32 failure (Socket::inet_pton not implemented + Your vendor has not defined Socket macro IPV6_V6ONLY)
Hi,

this is how IO::Socket::IP 0.18 fails on strawberry perl 5.16.2.1 (32bit)

Running Build test
t\00use.t ........................... ok
t\01local-client-v4.t ............... ok
t\02local-server-v4.t ............... ok
t\03local-cross-v4.t ................ ok
t\04local-client-v6.t ............... Socket::inet_pton not implemented on this architecture at t\04local-client-v6.t line 26.
Show quoted text
# Looks like your test exited with 25 before it could output anything.
t\04local-client-v6.t ............... Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 20/20 subtests
t\05local-server-v6.t ............... 1/30 Socket::inet_pton not implemented on this architecture at t\05local-server-v6.t line 41.
Show quoted text
# Looks like you planned 30 tests but ran 5.
# Looks like your test exited with 25 just after 5.
t\05local-server-v6.t ............... Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 25/30 subtests
t\06local-cross-v6.t ................ ok
t\10args.t .......................... ok
t\11sockopts.t ...................... ok
t\12port-fallback.t ................. ok
t\13addrinfo.t ...................... ok
t\14fileno.t ........................ ok
t\15io-socket.t ..................... ok
t\16v6only.t ........................ Your vendor has not defined Socket macro IPV6_V6ONLY, used at C:\strawberry_build
\env\UserProfile\AppData\Local\.cpan\build\IO-Socket-IP-0.18-Exgcom\blib\lib/IO/Socket/IP.pm line 557
Show quoted text
# Looks like your test exited with 25 before it could output anything.
t\16v6only.t ........................ Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 6/6 subtests
t\17gai-flags.t ..................... ok
t\18fdopen.t ........................ ok
t\20nonblocking-connect.t ........... ok
t\21nonblocking-connect-internet.t .. ok
t\99pod.t ........................... skipped: Test::Pod 1.00 required for testing POD

Test Summary Report
-------------------
t\04local-client-v6.t             (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 20 tests but ran 0.
t\05local-server-v6.t             (Wstat: 6400 Tests: 5 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 30 tests but ran 5.
t\16v6only.t                      (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 6 tests but ran 0.
Files=19, Tests=132,  6 wallclock secs ( 0.08 usr +  0.01 sys =  0.09 CPU)
Result: FAIL
Failed 3/19 test programs. 0/132 subtests failed.
  PEVANS/IO-Socket-IP-0.18.tar.gz
  C:\strawberry\perl\bin\perl.exe ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports PEVANS/IO-Socket-IP-0.18.tar.gz
Running Build install
  make test had returned bad status, won't install without force

--
kmx
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
On Wed Feb 20 15:01:34 2013, KMX wrote:
Show quoted text
> t\04local-client-v6.t ............... Socket::inet_pton not > implemented on this > architecture at t\04local-client-v6.t line 26. > # Looks like your test exited with 25 before it could output anything. > t\04local-client-v6.t ............... Dubious, test returned 25 (wstat > 6400, > 0x1900) > Failed 20/20 subtests > t\05local-server-v6.t ............... 1/30 Socket::inet_pton not > implemented on > this architecture at t\05local-server-v6.t line 41. > # Looks like you planned 30 tests but ran 5. > # Looks like your test exited with 25 just after 5. > t\05local-server-v6.t ............... Dubious, test returned 25 (wstat > 6400, > 0x1900) > Failed 25/30 subtests
Tricky. Without a working inet_pton() this will be a little harder. It can probably be synthesized by getaddrinfo() + unpack_sockaddr_in6(), but at that point I'd start to wonder if those functions were available either.
Show quoted text
> t\16v6only.t ........................ Your vendor has not defined > Socket macro > IPV6_V6ONLY, used at C:\strawberry_build > \env\UserProfile\AppData\Local\.cpan\build\IO-Socket-IP-0.18- > Exgcom\blib\lib/IO/Socket/IP.pm > line 557 > # Looks like your test exited with 25 before it could output anything. > t\16v6only.t ........................ Dubious, test returned 25 (wstat > 6400, > 0x1900) > Failed 6/6 subtests
Oops. That one should be simple enough to eval {} or plan skip_all around. -- Paul Evans
On Fri Apr 12 15:33:27 2013, PEVANS wrote:
Show quoted text
> Tricky. Without a working inet_pton() this will be a little harder. It > can probably be synthesized by getaddrinfo() + > unpack_sockaddr_in6(), but at that point I'd start to wonder if > those functions were available either.
Reported upstream to Strawberry: https://rt.cpan.org/Ticket/Display.html?id=84600 Find attached a patch to hopefully resolve these two issues anyway. -- Paul Evans
Subject: rt83485.patch
=== modified file 't/04local-client-v6.t' --- t/04local-client-v6.t 2013-03-11 22:18:59 +0000 +++ t/04local-client-v6.t 2013-04-12 19:51:00 +0000 @@ -23,8 +23,12 @@ my $testserver = IO::Socket->new; $testserver->socket( $AF_INET6, Socket->$socktype, 0 ) or die "Cannot socket() - $!"; - $testserver->bind( Socket::pack_sockaddr_in6( 0, Socket::inet_pton( $AF_INET6, "::1" ) ) ) or - die "Cannot bind() - $!"; + + my ( $err, $ai ) = Socket::getaddrinfo( "::1", 0, { family => $AF_INET6 } ); + die "getaddrinfo() - $err" if $err; + + $testserver->bind( $ai->{addr} ) or die "Cannot bind() - $!"; + if( $socktype eq "SOCK_STREAM" ) { $testserver->listen( 1 ) or die "Cannot listen() - $!"; } === modified file 't/05local-server-v6.t' --- t/05local-server-v6.t 2013-03-11 22:11:46 +0000 +++ t/05local-server-v6.t 2013-04-12 19:52:26 +0000 @@ -38,8 +38,11 @@ my $socket = IO::Socket->new; $socket->socket( $AF_INET6, Socket->$socktype, 0 ) or die "Cannot socket() - $!"; - $socket->connect( Socket::pack_sockaddr_in6( $testserver->sockport, Socket::inet_pton( $AF_INET6, "::1" ) ) ) - or die "Cannot connect() - $!"; + + my ( $err, $ai ) = Socket::getaddrinfo( "::1", $testserver->sockport, { family => $AF_INET6 } ); + die "getaddrinfo() - $err" if $err; + + $socket->connect( $ai->{addr} ) or die "Cannot connect() - $!"; my $testclient = ( $socktype eq "SOCK_STREAM" ) ? $testserver->accept : === modified file 't/16v6only.t' --- t/16v6only.t 2013-03-11 22:11:46 +0000 +++ t/16v6only.t 2013-04-12 19:31:28 +0000 @@ -11,6 +11,9 @@ eval { IO::Socket::IP->new( LocalHost => "::1" ) } or plan skip_all => "Unable to bind to ::1"; +eval { defined IPV6_V6ONLY } or + plan skip_all => "IPV6_V6ONLY not available"; + # Don't be locale-sensitive $! = Errno::ECONNREFUSED; my $ECONNREFUSED_STR = "$!";
Was released in 0.20 -- Paul Evans


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.