diff options
author | Martin Schwenke <martin@meltin.net> | 2014-12-01 13:50:42 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-12-10 20:56:10 +0100 |
commit | 1e6681f4f3149ae02f41badd483f21083792065a (patch) | |
tree | 56d7f989a95b38be825258245cea8e61e48c49e6 | |
parent | 2b9facf6f3d222668ac0bd2dadb16d0abb585f6c (diff) | |
download | samba-1e6681f4f3149ae02f41badd483f21083792065a.tar.gz |
ctdb-tests: Use ping_wrapper to do relevant ping or ping6
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 255705c030135bd54a1f7a7dc40cbf00c2fb39c9)
-rwxr-xr-x | ctdb/tests/complex/33_gratuitous_arp.sh | 2 | ||||
-rwxr-xr-x | ctdb/tests/complex/41_failover_ping_discrete.sh | 4 | ||||
-rw-r--r-- | ctdb/tests/complex/scripts/local.bash | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/ctdb/tests/complex/33_gratuitous_arp.sh b/ctdb/tests/complex/33_gratuitous_arp.sh index 721b0f2a348..a51aa0cdce9 100755 --- a/ctdb/tests/complex/33_gratuitous_arp.sh +++ b/ctdb/tests/complex/33_gratuitous_arp.sh @@ -57,7 +57,7 @@ echo "Removing ${test_ip} from the local ARP table..." arp -d $test_ip >/dev/null 2>&1 || true echo "Pinging ${test_ip}..." -ping -q -n -c 1 $test_ip +ping_wrapper -q -n -c 1 $test_ip echo "Getting MAC address associated with ${test_ip}..." original_mac=$(arp -n $test_ip | awk '$2 == "ether" {print $3}') diff --git a/ctdb/tests/complex/41_failover_ping_discrete.sh b/ctdb/tests/complex/41_failover_ping_discrete.sh index 88b2013f061..1fe7c1f5481 100755 --- a/ctdb/tests/complex/41_failover_ping_discrete.sh +++ b/ctdb/tests/complex/41_failover_ping_discrete.sh @@ -51,7 +51,7 @@ echo "Removing ${test_ip} from the local ARP table..." arp -d $test_ip >/dev/null 2>&1 || true echo "Pinging ${test_ip}..." -ping -q -n -c 1 $test_ip +ping_wrapper -q -n -c 1 $test_ip gratarp_sniff_start @@ -65,4 +65,4 @@ echo "Removing ${test_ip} from the local ARP table again..." arp -d $test_ip >/dev/null 2>&1 || true echo "Pinging ${test_ip} again..." -ping -q -n -c 1 $test_ip +ping_wrapper -q -n -c 1 $test_ip diff --git a/ctdb/tests/complex/scripts/local.bash b/ctdb/tests/complex/scripts/local.bash index 6fbc1aea719..fcd919b3723 100644 --- a/ctdb/tests/complex/scripts/local.bash +++ b/ctdb/tests/complex/scripts/local.bash @@ -170,3 +170,10 @@ ctdb_test_check_real_cluster () done } +ping_wrapper () +{ + case "$*" in + *:*) ping6 "$@" ;; + *) ping "$@" ;; + esac +} |