Skip Menu |

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

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

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

Bug Information
Severity: (no value)
Broken in: 0.55
Fixed in: 0.64



Subject: Testsuite fals if you're running on a machine with sshd running
If you're running with sshd running on its default port of 22, then the testsuite fails: t/51loop-connect.t ........... ok Test died early - listen on port 22 actually succeeded # Tests were run but no plan was declared and done_testing() was not seen. t/52loop-listen.t ............ Dubious, test returned 29 (wstat 7424, 0x1d00) All 13 subtests passed t/53loop-extend.t ............ ok This is like the other bug I reported, where I had to stop httpd to successfully install. Temporarily disabling sshd let me install successfully. Neil
On Tue Mar 19 08:03:31 2013, NEILB wrote: Show quoted text
> Test died early - listen on port 22 actually succeeded > # Tests were run but no plan was declared and done_testing() was > not seen. > t/52loop-listen.t ............ > Dubious, test returned 29 (wstat 7424, 0x1d00) > All 13 subtests passed
This is most most strange and I do not understand it. First it tests whether listening on the port will fail: | 129 IO::Socket::INET->new( | 130 Type => SOCK_STREAM, | 131 LocalHost => "localhost", | 132 LocalPort => $port, | 133 Listen => 1, | 134 ) and next; It can only fail the unit-test the way you explain, if somehow it fails to listen on the port given the above method, but then later succeeds when IO::Async attempts it. And given that IO::Async basically does theabove as well, I don't get why. Can you strace this test, so I can see what the underlying system calls it makes are? I have a few possible hypotheses, but I'd have to see the strace output to be sure. -- Paul Evans
Subject: Re: [rt.cpan.org #84051] Testsuite fals if you're running on a machine with sshd running
Date: Mon, 1 Apr 2013 10:29:24 +0100
To: bug-IO-Async [...] rt.cpan.org
From: Neil Bowers <neil [...] bowers.com>
I'm away from home at the moment -- will give this a go when I get back.
I think I have finally got to the bottom of this one. It seems to be a disagreement between SO_REUSEADDR being used by IO::Async bind but not the IO::Socket::INET->new() test probe beforehand, but which kicks in -only- if your SSH or Web server are bound listening to -specific- IP addresses but not the catch-all wildcard 0.0.0.0. The fix for the test is just to update either the probe or the real unit test, to ensure they both use the same SO_REUSEADDR setting. -- Paul Evans
On Wed Jan 08 19:31:33 2014, PEVANS wrote: Show quoted text
> The fix for the test is just to update either the probe or the real > unit test, to ensure they both use the same SO_REUSEADDR setting.
Find patch attached. -- Paul Evans
Subject: rt84051.patch
=== modified file 't/52loop-listen.t' --- t/52loop-listen.t 2013-09-30 19:51:05 +0000 +++ t/52loop-listen.t 2014-03-28 17:25:25 +0000 @@ -123,6 +123,7 @@ Type => SOCK_STREAM, LocalHost => "localhost", LocalPort => $port, + ReuseAddr => 1, Listen => 1, ) and next;
Released -- Paul Evans