develooper Front page | perl.perl5.porters | Postings from October 2017

[perl #132363] Net::Ping 2.61 test failures

Thread Next
From:
Martin Becker
Date:
October 28, 2017 22:24
Subject:
[perl #132363] Net::Ping 2.61 test failures
Message ID:
rt-4.0.24-1818-1509097952-206.132363-75-0@perl.org
# New Ticket Created by  Martin Becker 
# Please include the string:  [perl #132363]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132363 >



This is a bug report for perl from mhasch-cpanbugs@cozap.com,
generated with the help of perlbug 1.40 running under perl 5.26.1.


-----------------------------------------------------------------
[Please describe your issue here]

As of version 2.61, the Net::Ping test suite makes assumptions
about the IPv4 address 172.29.249.249.	This is an RFC 1918
address that may or may not be reachable in any local area
network.  Making tests fail based on its reachability is
therefore non-portable and should be avoided.

While replacing the RFC 1918 address by an RFC 5737 address
might reduce the risk of it actually being connected there
is no guarantee any address usage convention at all will be
met within private networks.  Therefore, in the test suite,
(non-)reachability of a particular address should always be
tolerated.

Interestingly, some tests against "known" internet hosts are
already skipped if an initial ping of "google.com" fails for
some reason.  Giving up this particular trigger and making all
connectivity-related checks report skip reasons rather than
failures could be a way to cope with most private and firewalled
network situations.

Even better though would be a test strategy aiming for code
quality criteria independent of outside conditions.  This might
be achieved using mock-up interfaces or at most localhost.

If nothing else, at least provide an opt-out configuration
parameter for remote network-aware tests.  Currently, PERL_CORE
in the environment will have that effect.  Unfortunately, this
parameter usually is a MakeMaker constant not under control
of the user (through distroprefs, say).  But not only core may
need to skip those tests.

Regards,
-Martin

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=high
    module=Net::Ping
---
Site configuration information for perl 5.26.1:

(stripped by reporter, considered irrelevant)


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