Skip to content

Commit 83f6787

Browse files
dist/Net-Ping - Inhibit sudo code in tests, as it was before recent upgrade to 2.75
1 parent 765f0a6 commit 83f6787

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/Net-Ping/t/500_ping_icmp.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ENV{TEST_PING_HOST} = "127.0.0.1" if $ENV{NO_NETWORK_TESTING};
2626
# Problem is that ping_icmp needs root perms, and previous bugs were
2727
# never caught. So I rather execute it via sudo in the core test suite
2828
# and on devel CPAN dirs, than not at all and risk further bitrot of this API.
29-
if (!Net::Ping::_isroot()) {
29+
if (0 && !Net::Ping::_isroot()) {
3030
my $file = __FILE__;
3131
my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib';
3232
if ($is_devel and $Config{ccflags} =~ /fsanitize=address/ and $^O eq 'linux') {
@@ -55,7 +55,7 @@ if (!Net::Ping::_isroot()) {
5555

5656
SKIP: {
5757
skip "icmp ping requires root privileges.", 2
58-
if ($^O ne 'Linux' and !Net::Ping::_isroot()) or $^O eq 'MSWin32';
58+
if !Net::Ping::_isroot() or $^O eq 'MSWin32';
5959
my $p = new Net::Ping "icmp";
6060
is($p->message_type(), 'echo', "default icmp message type is 'echo'");
6161
# message_type fails on wrong message type

dist/Net-Ping/t/501_ping_icmpv6.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BEGIN {
2020

2121
my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0;
2222
$ENV{TEST_PING6_HOST} = "::1" if $ENV{NO_NETWORK_TESTING};
23-
if (!Net::Ping::_isroot()) {
23+
if (0 && !Net::Ping::_isroot()) {
2424
my $file = __FILE__;
2525
my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib';
2626
# -n prevents from asking for a password. rather fail then

0 commit comments

Comments
 (0)