On 13 November 2017 at 04:46, Chad Granum <exodi...@gmail.com> wrote:
> Kent, (or anyone really)
>
> Can you point to any documentation that covers these env vars, and the best
> practices you layed out? I have never even heard of the NO_NETWORK_TESTING
> var, and considering what modules I maibtain that is worrysome.
>
> I am not asking out of doubt, I want to educate myself, and make these vars
> clearly documented along with when to use them in Test-Simple and related
> modules.

Its more an emerging convention that is gaining adoption, than an
official strategy.

I started an email to this list a few years back,
https://www.nntp.perl.org/group/perl.cpan.workers/2014/06/msg1117.html
and this network variable ended up being rolled out in a few places as a result.

The rationale as to why this approach is warranted is spelled out in
that thread, but the gist of it is its not always safe to use sniffing
to determine network availability, doing so can get given
false-positives through network sandboxes and weird routing
configurations, and syscall sandboxing can result in network calls
tripping a SIGKILL on your process.

Hence the application of an ENV var that states "Do not under any
circumstances attempt to access the internet" serves as a decent gate
keeper.

This ENV var is still far from ubiquitous, but it is far more applied
across CPAN than its competition these days.

And for what its worth, NO_NETWORK_TESTING is employed by default when
Gentoo builds and tests packages, unless the user explicitly opts to
enable network tests, and anything that respects that ENV var
automatically benefits. ( Because from a security standpoint, the
machine which fetches the .tar.gz's and the machine that installs and
tests a package need not be the same machine, nor need be the same
security level, and so the default approach is to ensure the build
environment is tightly locked down, but this can cause spurious test
failures when tests try to dial out to nowhere. Sometimes things as
innocuous as trying to resolve "localhost" can get you having problems
)

Reply via email to