Skip Menu |

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

Report information
The Basics
Id: 119369
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: Tests fail on Solaris
Apparently some minor upset about error message strings in resolver: # Failed test 'getaddrinfo_array - error message' # at t/50resolver.t line 152. # got: 'The service parameter was not recognized for the specified socket type.' # expected: 'The service parameter was not recognized for the specified socket type. # ' # Failed test 'getaddrinfo_hash - error message' # at t/50resolver.t line 178. # got: 'The service parameter was not recognized for the specified socket type.' # expected: 'The service parameter was not recognized for the specified socket type. # ' # Failed test '$resolver->getaddrinfo - error message' # at t/50resolver.t line 205. # got: 'The service parameter was not recognized for the specified socket type.' # expected: 'The service parameter was not recognized for the specified socket type. # ' # Failed test '$resolver->getaddrinfo - error message' # at t/50resolver.t line 229. # got: 'The service parameter was not recognized for the specified socket type.' # expected: 'The service parameter was not recognized for the specified socket type. # ' # Looks like you failed 4 tests of 34. t/50resolver.t ............... Dubious, test returned 4 (wstat 1024, 0x400) This doesn't immediately feel like a Solaris-specific failure, but it doesn't do that on other platforms (e.g. Linux, FreeBSD). -- Paul Evans
On Thu Dec 22 09:46:11 2016, PEVANS wrote: Show quoted text
> This doesn't immediately feel like a Solaris-specific failure, but it > doesn't do that on other platforms (e.g. Linux, FreeBSD).
Ah; I see what's going on. The specific failing about linefeeds is nothing Solaris-specific, the test itself is broken: if( $localhost_err ) { is( $result->[0], "error", 'getaddrinfo_array - error' ); is_deeply( $result->[1], "$localhost_err\n", 'getaddrinfo_array - error message' ); } else { is( $result->[0], "resolved", 'getaddrinfo_array - resolved' ); my @got = @{$result}[1..$#$result]; my @expect = map { [ @{$_}{qw( family socktype protocol addr canonname )} ] } @localhost_addrs; is_deeply( \@got, \@expect, 'getaddrinfo_array - resolved addresses' ); } So actually this test will fail on any platform for which $localhost_err is set. It just turns out that Solaris is one of the few where it is. -- Paul Evans
On Thu Dec 22 09:52:04 2016, PEVANS wrote: Show quoted text
> The specific failing about linefeeds is nothing Solaris-specific, the > test itself is broken:
Attached patch fixes this one. I might still look into why Solaris takes the err branch though. -- Paul Evans
Subject: rt119369.patch
=== modified file 't/50resolver.t' --- t/50resolver.t 2016-04-04 15:45:59 +0000 +++ t/50resolver.t 2016-12-22 15:00:41 +0000 @@ -149,7 +149,7 @@ if( $localhost_err ) { is( $result->[0], "error", 'getaddrinfo_array - error' ); - is_deeply( $result->[1], "$localhost_err\n", 'getaddrinfo_array - error message' ); + is_deeply( $result->[1], "$localhost_err", 'getaddrinfo_array - error message' ); } else { is( $result->[0], "resolved", 'getaddrinfo_array - resolved' ); @@ -175,7 +175,7 @@ if( $localhost_err ) { is( $result->[0], "error", 'getaddrinfo_hash - error' ); - is_deeply( $result->[1], "$localhost_err\n", 'getaddrinfo_hash - error message' ); + is_deeply( $result->[1], "$localhost_err", 'getaddrinfo_hash - error message' ); } else { is( $result->[0], "resolved", 'getaddrinfo_hash - resolved' ); @@ -202,7 +202,7 @@ if( $localhost_err ) { is( $result->[0], "error", '$resolver->getaddrinfo - error' ); - is_deeply( $result->[1], "$localhost_err\n", '$resolver->getaddrinfo - error message' ); + is_deeply( $result->[1], "$localhost_err", '$resolver->getaddrinfo - error message' ); } else { is( $result->[0], "resolved", '$resolver->getaddrinfo - resolved' ); @@ -226,7 +226,7 @@ wait_for { $future->is_ready }; if( $localhost_err ) { - is( scalar $future->failure, "$localhost_err\n", '$resolver->getaddrinfo - error message' ); + is( scalar $future->failure, "$localhost_err", '$resolver->getaddrinfo - error message' ); is( ( $future->failure )[1], "resolve", '->failure [1]' ); is( ( $future->failure )[2], "getaddrinfo", '->failure [2]' ); } @@ -273,7 +273,7 @@ if( $passive_err ) { is( $result->[0], "error", '$resolver->getaddrinfo passive - error synchronously' ); - is_deeply( $result->[1], "$passive_err\n", '$resolver->getaddrinfo passive - error message' ); + is_deeply( $result->[1], "$passive_err", '$resolver->getaddrinfo passive - error message' ); } else { is( $result->[0], "resolved", '$resolver->getaddrinfo passive - resolved synchronously' ); @@ -342,7 +342,7 @@ if( $testerr ) { is( $result->[0], "error", '$resolver->getnameinfo - error' ); - is_deeply( $result->[1], "$testerr\n", '$resolver->getnameinfo - error message' ); + is_deeply( $result->[1], "$testerr", '$resolver->getnameinfo - error message' ); } else { is( $result->[0], "resolved", '$resolver->getnameinfo - resolved' ); @@ -356,7 +356,7 @@ ); if( $testerr ) { - is( scalar $future->failure, "$testerr\n", '$resolver->getnameinfo - error message from future' ); + is( scalar $future->failure, "$testerr", '$resolver->getnameinfo - error message from future' ); is( ( $future->failure )[1], "resolve", '->failure [1]' ); is( ( $future->failure )[2], "getnameinfo", '->failure [2]' ); }