From 83f67871ad3845bdf7d229ed5591f7695bd61fb7 Mon Sep 17 00:00:00 2001 From: Thibault DUPONCHELLE Date: Tue, 23 Sep 2025 04:33:38 +0200 Subject: [PATCH] dist/Net-Ping - Inhibit sudo code in tests, as it was before recent upgrade to 2.75 --- dist/Net-Ping/t/500_ping_icmp.t | 4 ++-- dist/Net-Ping/t/501_ping_icmpv6.t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/Net-Ping/t/500_ping_icmp.t b/dist/Net-Ping/t/500_ping_icmp.t index 8b4566e638..9fc6b4dc53 100644 --- a/dist/Net-Ping/t/500_ping_icmp.t +++ b/dist/Net-Ping/t/500_ping_icmp.t @@ -26,7 +26,7 @@ $ENV{TEST_PING_HOST} = "127.0.0.1" if $ENV{NO_NETWORK_TESTING}; # Problem is that ping_icmp needs root perms, and previous bugs were # never caught. So I rather execute it via sudo in the core test suite # and on devel CPAN dirs, than not at all and risk further bitrot of this API. -if (!Net::Ping::_isroot()) { +if (0 && !Net::Ping::_isroot()) { my $file = __FILE__; my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib'; if ($is_devel and $Config{ccflags} =~ /fsanitize=address/ and $^O eq 'linux') { @@ -55,7 +55,7 @@ if (!Net::Ping::_isroot()) { SKIP: { skip "icmp ping requires root privileges.", 2 - if ($^O ne 'Linux' and !Net::Ping::_isroot()) or $^O eq 'MSWin32'; + if !Net::Ping::_isroot() or $^O eq 'MSWin32'; my $p = new Net::Ping "icmp"; is($p->message_type(), 'echo', "default icmp message type is 'echo'"); # message_type fails on wrong message type diff --git a/dist/Net-Ping/t/501_ping_icmpv6.t b/dist/Net-Ping/t/501_ping_icmpv6.t index 9b5b8b8f98..895a7a6bf6 100644 --- a/dist/Net-Ping/t/501_ping_icmpv6.t +++ b/dist/Net-Ping/t/501_ping_icmpv6.t @@ -20,7 +20,7 @@ BEGIN { my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0; $ENV{TEST_PING6_HOST} = "::1" if $ENV{NO_NETWORK_TESTING}; -if (!Net::Ping::_isroot()) { +if (0 && !Net::Ping::_isroot()) { my $file = __FILE__; my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib'; # -n prevents from asking for a password. rather fail then