From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ido Schimmel Subject: [PATCH net-next 05/18] selftests: forwarding: ping{6,}_do(): Allow passing ping arguments Date: Mon, 19 Nov 2018 16:11:12 +0000 Message-ID: <20181119161006.5405-6-idosch@mellanox.com> References: <20181119161006.5405-1-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "davem@davemloft.net" , "shuah@kernel.org" , Jiri Pirko , Petr Machata , "roopa@cumulusnetworks.com" , mlxsw , Ido Schimmel To: "netdev@vger.kernel.org" , "linux-kselftest@vger.kernel.org" Return-path: Received: from mail-eopbgr10049.outbound.protection.outlook.com ([40.107.1.49]:48096 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729979AbeKTCf0 (ORCPT ); Mon, 19 Nov 2018 21:35:26 -0500 In-Reply-To: <20181119161006.5405-1-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: From: Petr Machata Make the ping routine more generic by allowing passing arbitrary ping command-line arguments. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/= selftests/net/forwarding/lib.sh index fa734ddce2e9..e916663a1019 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -801,10 +801,11 @@ ping_do() { local if_name=3D$1 local dip=3D$2 + local args=3D$3 local vrf_name =20 vrf_name=3D$(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 } =20 ping_test() @@ -820,10 +821,11 @@ ping6_do() { local if_name=3D$1 local dip=3D$2 + local args=3D$3 local vrf_name =20 vrf_name=3D$(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 } =20 ping6_test() --=20 2.19.1