Skip Menu |

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

Report information
The Basics
Id: 58198
Status: resolved
Priority: 0/
Queue: IO-Socket-INET6

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.63
Fixed in: (no value)



Subject: t/io_multihomed6.t doesn't check for error from getaddrinfo() - causes test suite failures
This is basically a follow-up from RT#57676 where I was having trouble with t/io_multihomed6.t on old Linux distributions. It seems I'm not alone: http://www.cpantesters.org/cpan/report/07347844-b19f-3f77-b713-d32bba55d77f Anyway, the problem seems to be that getaddrinfo('localhost',1) fails on these systems and returns an error message ("Servname not supported for ai_socktype") instead of the expected data, resulting in the test failure: Use of uninitialized value in subroutine entry at t/io_multihomed6.t line 52. Bad arg length for Socket6::unpack_sockaddr_in6, length is 0, should be 28 at t/io_multihomed6.t line 52. t/io_multihomed6.t .... Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run Attached patch adds a test for this and skips the test if it happens. It seems from the cpantesters results that a lot of people are still getting subtests 3 and 4 of this test happening in the wrong order; that seems to be the failure mode for most of the "FAIL" results.
Subject: IO-Socket-INET6-2.63-getaddrinfo.patch
--- IO-Socket-INET6-2.63/t/io_multihomed6.t.debug 2010-05-29 12:43:55.000000000 +0100 +++ IO-Socket-INET6-2.63/t/io_multihomed6.t 2010-06-07 14:46:45.104104745 +0100 @@ -46,6 +46,10 @@ { my %resolved_addresses; my @r = getaddrinfo('localhost',1); + if (@r < 5) { + print "1..0 # SKIP getaddrinfo('localhost',1) failed: $r[0]\n"; + exit 0; + } while (@r) { my @values = splice(@r,0,5); my ($fam,$addr) = @values[0,3];
Hi Paul, On Mon Jun 07 10:30:18 2010, paul@city-fan.org wrote: Show quoted text
> This is basically a follow-up from RT#57676 where I was having trouble > with t/io_multihomed6.t on old Linux distributions. It seems I'm not
alone: Show quoted text
> >
http://www.cpantesters.org/cpan/report/07347844-b19f-3f77-b713-d32bba55d77f Show quoted text
> > Anyway, the problem seems to be that getaddrinfo('localhost',1) fails on > these systems and returns an error message ("Servname not supported for > ai_socktype") instead of the expected data, resulting in the test failure: > > Use of uninitialized value in subroutine entry at t/io_multihomed6.t > line 52. > Bad arg length for Socket6::unpack_sockaddr_in6, length is 0, should be > 28 at t/io_multihomed6.t line 52. > t/io_multihomed6.t .... > Dubious, test returned 255 (wstat 65280, 0xff00) > No subtests run > > Attached patch adds a test for this and skips the test if it happens. >
Thanks! I reviewed and applied it and released it as IO-Socket-INET6-2.64 . Regards, -- Shlomi Fish Show quoted text
> It seems from the cpantesters results that a lot of people are still > getting subtests 3 and 4 of this test happening in the wrong order; that > seems to be the failure mode for most of the "FAIL" results.