Skip Menu |

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

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

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

Bug Information
Severity: (no value)
Broken in: 0.70
Fixed in: 0.71



Subject: Some name resolvers can upset 50resolver.t
# Failed test '->failure [3] gives EAI_NONAME' # at t/50resolver.t line 323. # got: '-5' # expected: '-2' # Looks like you failed 1 test of 32. t/50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x100) The test expects EAI_NONAME(-2) but gets EAI_NODATA(-5) While not strictly correct, the test probably ought to accept EAI_NODATA anyway, because it seems some name resolver setups cause this to happen. -- Paul Evans
Fixed. -- Paul Evans
Subject: rt113429.patch
=== modified file 't/50resolver.t' --- t/50resolver.t 2015-07-31 19:02:02 +0000 +++ t/50resolver.t 2016-04-04 15:45:59 +0000 @@ -320,7 +320,10 @@ ok( $future->failure, '$future failed for missing host' ); is( ( $future->failure )[1], "resolve", '->failure [1] gives resolve' ); is( ( $future->failure )[2], "getaddrinfo", '->failure [2] gives getaddrinfo' ); - is( ( $future->failure )[3], Socket::EAI_NONAME, '->failure [3] gives EAI_NONAME' ); + + my $errno = ( $future->failure )[3]; + ok( $errno == Socket::EAI_NONAME || $errno == Socket::EAI_NODATA, '->failure [3] gives EAI_NONAME or EAI_NODATA' ) or + diag( '$errno is ' . $errno ); } my $testaddr = pack_sockaddr_in( 80, INADDR_LOOPBACK );