Skip Menu |

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

Report information
The Basics
Id: 64558
Status: resolved
Priority: 0/
Queue: IO-Async

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.35
Fixed in: 0.36



Subject: Failed test '$resolver->getaddrinfo resolved addressess synchronously'
Lots of CPAN Testers smoke fails with: # Failed test '$resolver->getaddrinfo resolved addressess synchronously' # at t/50resolver.t line 213. # Structures begin differing at: # $got->[1] = Does not exist # $expected->[1] = HASH(0x2a97390) # Looks like you failed 1 test of 17. t/50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x100) This is a new test added in 0.35; older versions should be OK. Will look into it... -- Paul Evans
Seems to be related to https://bugzilla.redhat.com/show_bug.cgi?id=496300 $ grep localhost /etc/hosts 127.0.0.1 localhost ::1 localhost Fails Delete the ::1 line, and the test passes. That gives me a simple way to reproduce it anyway.. -- Paul Evans
On Thu Jan 06 18:55:44 2011, PEVANS wrote: Show quoted text
> Will look into it...
I have a workaround patch; just test the first result. It ensures the resolver works enough to generate that without giving duplicates. -- Paul Evans
Subject: rt-64558.patch
=== modified file 't/50resolver.t' --- t/50resolver.t 2011-01-03 19:30:54 +0000 +++ t/50resolver.t 2011-01-07 00:11:30 +0000 @@ -210,7 +210,12 @@ my @got = @{$result}[1..$#$result]; - is_deeply( \@got, \@localhost_addrs, '$resolver->getaddrinfo resolved addressess synchronously' ); + # GNU libc returns a duplicate AF_INET entry for "localhost" if /etc/hosts + # also contains a line "::1 localhost" + # https://rt.cpan.org/Ticket/Display.html?id=64558 + # We're only expecting one result anyway, it should be unique. So just + # test the first one. + is_deeply( $got[0], $localhost_addrs[0], '$resolver->getaddrinfo resolved address synchronously' ); } my $testaddr = pack_sockaddr_in( 80, INADDR_LOOPBACK );
Fixed in 0.36. Now on CPAN -- Paul Evans