Skip to content

Commit

Permalink
selftests: forwarding: ping{6, }_do(): Allow passing ping arguments
Browse files Browse the repository at this point in the history
Make the ping routine more generic by allowing passing arbitrary ping
command-line arguments.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Petr Machata authored and David S. Miller committed Nov 20, 2018
1 parent 58c7a2d commit d20b0f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/testing/selftests/net/forwarding/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,11 @@ ping_do()
{
local if_name=$1
local dip=$2
local args=$3
local vrf_name

vrf_name=$(master_name_get $if_name)
ip vrf exec $vrf_name $PING $dip -c 10 -i 0.1 -w 2 &> /dev/null
ip vrf exec $vrf_name $PING $args $dip -c 10 -i 0.1 -w 2 &> /dev/null
}

ping_test()
Expand All @@ -820,10 +821,11 @@ ping6_do()
{
local if_name=$1
local dip=$2
local args=$3
local vrf_name

vrf_name=$(master_name_get $if_name)
ip vrf exec $vrf_name $PING6 $dip -c 10 -i 0.1 -w 2 &> /dev/null
ip vrf exec $vrf_name $PING6 $args $dip -c 10 -i 0.1 -w 2 &> /dev/null
}

ping6_test()
Expand Down

0 comments on commit d20b0f2

Please sign in to comment.