Skip Menu |

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

Report information
The Basics
Id: 128986
Status: new
Priority: 0/
Queue: IO-Socket-IP

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

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



Subject: FreeBSD: Allow ETIMEDOUT on FreeBSD INET6 socket with V6Only true
My freebsd smokers fail on one t/16v6only.t test with ETIMEDOUT, see e.g. https://cirrus-ci.com/task/5137254568689664 Some FreeBSD's don't allow to connect to localhost with ipv6 Attached is a patch to fix that. -- Reini Urban
Subject: IO-Socket-IP-16v6only.patch
commit 0f17a862ce080c237c026a25b05260582a148460 Author: Reini Urban <rurban@cpan.org> Date: Mon Apr 1 09:39:59 2019 +0200 IO::Socket::IP 0.39_03 Allow ETIMEDOUT on FreeBSD INET6 socket with V6Only true. diff --git cpan/IO-Socket-IP/t/16v6only.t cpan/IO-Socket-IP/t/16v6only.t index d900cd7ceb..1ca2376112 100644 --- cpan/IO-Socket-IP/t/16v6only.t +++ cpan/IO-Socket-IP/t/16v6only.t @@ -19,6 +19,8 @@ $^O eq "irix" and plan skip_all => "$^O: IPV6_V6ONLY exists but getnameinfo() fails with EAI_NONAME"; # Don't be locale-sensitive +$! = Errno::ETIMEDOUT; +my $ETIMEDOUT_STR = "$!"; $! = Errno::ECONNREFUSED; my $ECONNREFUSED_STR = "$!"; @@ -44,7 +46,12 @@ my $ECONNREFUSED_STR = "$!"; my $err = "$@"; ok( !defined $testsock, 'Unable to connect PF_INET socket to PF_INET6 socket with V6Only true' ); - like( $err, qr/\Q$ECONNREFUSED_STR/, 'Socket creation fails with connection refused' ); + if ($^O eq 'freebsd') { + like( $err, qr/(\Q$ECONNREFUSED_STR\E|\Q$ETIMEDOUT_STR\E)/, + 'Socket creation fails with ECONNREFUSED or ETIMEDOUT' ); + } else { + like( $err, qr/\Q$ECONNREFUSED_STR/, 'Socket creation fails with connection refused' ); + } } SKIP: {