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

Report information
The Basics
Id:
131109
Status:
patched
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Normal
Broken in:
0.75
Fixed in:
(no value)

Attachments
IO-Async-0.77-Adjust-t-50resolver.t-test-for-an-unavailable-DNS-se.patch



Subject: t/50resolver.t fails under perl 5.30.1 on Linux
Link to the current log: https://build.opensuse.org/package/live_build_log/devel:languages:perl:autoupdate/perl-IO-Async/standard/x86_64 # Failed test '->failure [3] gives EAI_NONAME or EAI_NODATA' # at t/50resolver.t line 341. # $errno is -3 # Looks like you failed 1 test of 34. t/50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/34 subtests I can provide more info if necessary.
FWIW, I cannot reproduce this myself manually. It happens only in the Open Build Service environment. I tried the following to reproduce: docker run -it --rm opensuse/tumbleweed bash -> zypper in wget tar zypper ar obs://build.opensuse.org/devel:languages:perl devel-languages-perl zypper install perl-5.30.1-176.2.x86_64 cd tmp wget https://cpan.metacpan.org/authors/id/P/PE/PEVANS/IO-Async-0.75.tar.gz tar xvf IO-Async-0.75.tar.gz cd IO-Async-0.75 zypper in perl-Module-Build perl-Future perl-Struct-Dumb perl-Test-Fatal perl-Test-Identity perl-Test-Refcount perl Build.PL ./Build prove -bv t/50resolver.t
Le Ven 29 Nov 2019 11:14:24, TINITA a écrit :
Show quoted text
> FWIW, I cannot reproduce this myself manually. It happens only in the > Open Build Service environment.
We have had the same issue in the Fedora development repository. It looks like, with recent versions of glibc, getaddrinfo() can set errno to EAGAIN when doing lookups of things that don't look like valid IP addresses when networking is disabled.
Dne Ne 16.srp.2020 05:48:20, http://eseyman.id.fedoraproject.org/ napsal(a):
Show quoted text
> Le Ven 29 Nov 2019 11:14:24, TINITA a écrit :
> > FWIW, I cannot reproduce this myself manually. It happens only in the > > Open Build Service environment.
> > We have had the same issue in the Fedora development repository. It looks > like, with recent versions of glibc, getaddrinfo() can set errno to EAGAIN > when doing lookups of things that don't look like valid IP addresses when > networking is disabled.
I believe it is a deficiency in the test that does not expect that a DNS server can be unavailable. An attached patch fixes it.
Subject: IO-Async-0.77-Adjust-t-50resolver.t-test-for-an-unavailable-DNS-se.patch
From 27bc9f6cf7f751d294d110160b66460a7c26fbba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 24 Sep 2020 13:40:36 +0200 Subject: [PATCH] Adjust t/50resolver.t test for an unavailable DNS server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If no DNS server is available (e.g. empty /etc/resolv.conf and no DNS server listening on localhost), getaddrinfo() function reports EAI_AGAIN (or EAI_FAIL) to distinguish the DNS procol error from a negative respons by the DNS server. t/50resolver.t did not expected it and failed likes this in SuSE and Fedora build systems: t/42function.t ............... ok # Failed test '->failure [3] gives EAI_NONAME or EAI_NODATA' # at t/50resolver.t line 344. # $errno is -3 # Looks like you failed 1 test of 35. t/50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x100) This patch fixes it. CPAN RT#131109 Signed-off-by: Petr Písař <ppisar@redhat.com> --- t/50resolver.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/50resolver.t b/t/50resolver.t index 68f4446..b7cfb56 100644 --- a/t/50resolver.t +++ b/t/50resolver.t @@ -341,7 +341,9 @@ SKIP: { is( ( $future->failure )[2], "getaddrinfo", '->failure [2] gives getaddrinfo' ); my $errno = ( $future->failure )[3]; - ok( $errno == Socket::EAI_NONAME || $errno == Socket::EAI_NODATA, '->failure [3] gives EAI_NONAME or EAI_NODATA' ) or + ok( $errno == Socket::EAI_FAIL || $errno == Socket::EAI_AGAIN || # no server available + $errno == Socket::EAI_NONAME || $errno == Socket::EAI_NODATA, # server confirmed no DNS entry + '->failure [3] gives EAI_FAIL or EAI_AGAIN or EAI_NONAME or EAI_NODATA' ) or diag( '$errno is ' . $errno ); } -- 2.25.4
Thanks. Now applied; will be in next release. -- Paul Evans


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.