|
|
814e73 |
From a42c6588e33a1d6d847b60ef3386bfd122ce030b Mon Sep 17 00:00:00 2001
|
|
|
814e73 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
814e73 |
Date: Wed, 18 Nov 2020 09:49:48 +0100
|
|
|
814e73 |
Subject: [PATCH 1/2] Use non-routable addreses for negative tests
|
|
|
814e73 |
MIME-Version: 1.0
|
|
|
814e73 |
Content-Type: text/plain; charset=UTF-8
|
|
|
814e73 |
Content-Transfer-Encoding: 8bit
|
|
|
814e73 |
|
|
|
814e73 |
This patch uses the addresses reserved for a documentation purpose
|
|
|
814e73 |
which should be unroutable instead of just a random address.
|
|
|
814e73 |
|
|
|
814e73 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
814e73 |
---
|
|
|
814e73 |
t/190_alarm.t | 2 +-
|
|
|
814e73 |
t/200_ping_tcp.t | 2 +-
|
|
|
814e73 |
t/400_ping_syn.t | 2 +-
|
|
|
814e73 |
t/410_syn_host.t | 2 +-
|
|
|
814e73 |
t/420_ping_syn_port.t | 2 +-
|
|
|
814e73 |
t/501_ping_icmpv6.t | 2 +-
|
|
|
814e73 |
6 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
814e73 |
|
|
|
814e73 |
diff --git a/t/190_alarm.t b/t/190_alarm.t
|
|
|
814e73 |
index 65276a2..f86305c 100644
|
|
|
814e73 |
--- a/t/190_alarm.t
|
|
|
814e73 |
+++ b/t/190_alarm.t
|
|
|
814e73 |
@@ -29,7 +29,7 @@ use Test::More tests => 6;
|
|
|
814e73 |
BEGIN {use_ok 'Net::Ping'};
|
|
|
814e73 |
|
|
|
814e73 |
# Hopefully this is never a routeable host
|
|
|
814e73 |
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
|
|
814e73 |
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
|
|
814e73 |
|
|
|
814e73 |
eval {
|
|
|
814e73 |
my $timeout = 11;
|
|
|
814e73 |
diff --git a/t/200_ping_tcp.t b/t/200_ping_tcp.t
|
|
|
814e73 |
index e2bfe18..8e8f56d 100644
|
|
|
814e73 |
--- a/t/200_ping_tcp.t
|
|
|
814e73 |
+++ b/t/200_ping_tcp.t
|
|
|
814e73 |
@@ -18,7 +18,7 @@ BEGIN {
|
|
|
814e73 |
}
|
|
|
814e73 |
|
|
|
814e73 |
# Hopefully this is never a routeable host
|
|
|
814e73 |
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
|
|
814e73 |
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
|
|
814e73 |
|
|
|
814e73 |
# Remote network test using tcp protocol.
|
|
|
814e73 |
#
|
|
|
814e73 |
diff --git a/t/400_ping_syn.t b/t/400_ping_syn.t
|
|
|
814e73 |
index 1ccec9f..8409aae 100644
|
|
|
814e73 |
--- a/t/400_ping_syn.t
|
|
|
814e73 |
+++ b/t/400_ping_syn.t
|
|
|
814e73 |
@@ -33,7 +33,7 @@ BEGIN {
|
|
|
814e73 |
# $ PERL_CORE=1 make test
|
|
|
814e73 |
|
|
|
814e73 |
# Hopefully this is never a routeable host
|
|
|
814e73 |
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
|
|
814e73 |
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
|
|
814e73 |
|
|
|
814e73 |
# Try a few remote servers
|
|
|
814e73 |
my %webs = (
|
|
|
814e73 |
diff --git a/t/410_syn_host.t b/t/410_syn_host.t
|
|
|
814e73 |
index d84a7eb..15948e2 100644
|
|
|
814e73 |
--- a/t/410_syn_host.t
|
|
|
814e73 |
+++ b/t/410_syn_host.t
|
|
|
814e73 |
@@ -37,7 +37,7 @@ BEGIN {
|
|
|
814e73 |
my %webs;
|
|
|
814e73 |
BEGIN {
|
|
|
814e73 |
# Hopefully this is never a routeable host
|
|
|
814e73 |
- my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
|
|
814e73 |
+ my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
|
|
814e73 |
|
|
|
814e73 |
%webs = (
|
|
|
814e73 |
$fail_ip => 0,
|
|
|
814e73 |
diff --git a/t/420_ping_syn_port.t b/t/420_ping_syn_port.t
|
|
|
814e73 |
index 55ee88a..53c153f 100644
|
|
|
814e73 |
--- a/t/420_ping_syn_port.t
|
|
|
814e73 |
+++ b/t/420_ping_syn_port.t
|
|
|
814e73 |
@@ -34,7 +34,7 @@ BEGIN {
|
|
|
814e73 |
# $ PERL_CORE=1 make test
|
|
|
814e73 |
|
|
|
814e73 |
# Hopefully this is never a routeable host
|
|
|
814e73 |
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
|
|
814e73 |
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
|
|
814e73 |
|
|
|
814e73 |
# Try a few remote servers
|
|
|
814e73 |
my %webs;
|
|
|
814e73 |
diff --git a/t/501_ping_icmpv6.t b/t/501_ping_icmpv6.t
|
|
|
814e73 |
index 3d2b789..165824f 100644
|
|
|
814e73 |
--- a/t/501_ping_icmpv6.t
|
|
|
814e73 |
+++ b/t/501_ping_icmpv6.t
|
|
|
814e73 |
@@ -59,7 +59,7 @@ SKIP: {
|
|
|
814e73 |
my $rightip = "2001:4860:4860::8888"; # pingable ip of google's dnsserver
|
|
|
814e73 |
# for a firewalled ipv6 network try an optional local ipv6 host
|
|
|
814e73 |
$rightip = $ENV{TEST_PING6_HOST} if $ENV{TEST_PING6_HOST};
|
|
|
814e73 |
- my $wrongip = "2001:4860:4860::1234"; # non existing ip
|
|
|
814e73 |
+ my $wrongip = "2001:db8::"; # non existing ip
|
|
|
814e73 |
# diag "Pinging existing IPv6 ";
|
|
|
814e73 |
my $result = $p->ping($rightip);
|
|
|
814e73 |
if ($result == 1) {
|
|
|
814e73 |
--
|
|
|
814e73 |
2.25.4
|
|
|
814e73 |
|