develooper Front page | perl.perl5.porters | Postings from April 2014

issues in cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t

Thread Next
From:
Dave Mitchell
Date:
April 15, 2014 20:47
Subject:
issues in cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t
Message ID:
20140415204717.GH18018@iabyn.com
I was looking into some smoke failures of

    cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t

They only affect a few smoke hosts, and the only thing they seem to have
in common is they all fail with 'No plan found in TAP output'.

Looking at the log for one of those smokes shows that it's dying at
line 48:

      $ret or die "select() timed out";

I'm speculating that this is because for whatever reason, the test script
is timing out trying to connect to cpanidx.org port 80.

So, the first thing that strikes me as wrong here is that on timeout,
the test script shouldn't just die (and abandon the rest of the script),
but do a suitable number of "not ok"s then carry on.

The second thing that occurs to me is that the tests shouldn't be
vulnerable to the vagaries of external connectivity.  I see that it does a
3-second-timeout connect to the host first using IO::Socket::INET(), and
skips the "proper" test if that fails; I would would speculate that
something involving differences between IPv4 and IPv6 is causing the
problematic smoker hosts to succeed with the IO::Socket::INET() connection
then timeout on the IO::Socket::IP() connection.

If this can't be made more robust, then perhaps blead should exclude
31nonblocking-connect-internet.t from the distribution? Alternatively,
perhaps we need something in perldelta for 5.20 explaining that this test
script may fail/die?


-- 
It's not that I'm afraid to die, I just don't want to be there when it
happens.
    -- Woody Allen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About