From patchwork Mon Nov 19 16:11:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10688881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3249A17FE for ; Mon, 19 Nov 2018 16:11:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22ABA2A0FD for ; Mon, 19 Nov 2018 16:11:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16C4B2A0F8; Mon, 19 Nov 2018 16:11:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A85242A0FD for ; Mon, 19 Nov 2018 16:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729988AbeKTCf0 (ORCPT ); Mon, 19 Nov 2018 21:35:26 -0500 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=feKXFZInCaZwSdoe/mcRS+/7wpd1mpoO7+RNpOhhU8I=; b=eFW5xoiGSs3MUi+eYvLfht4aQETOpMX/Lyal/KGrI7erJ/Tp0ps3XC+A2FMliDulWSIdisyaA7sDNZIag+5avql1SrPTAZ//BLZHomXIab7ZexZYp4uD3EspFtft2PX+Q4bp6SQMuuounxLCqZpYbPT2E/sU1s9mPpqdUvcssyg= Received: from AM0PR05MB4978.eurprd05.prod.outlook.com (20.177.42.95) by AM0PR05MB6225.eurprd05.prod.outlook.com (20.178.115.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Mon, 19 Nov 2018 16:11:12 +0000 Received: from AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a]) by AM0PR05MB4978.eurprd05.prod.outlook.com ([fe80::f953:cde4:ff8d:501a%4]) with mapi id 15.20.1339.026; Mon, 19 Nov 2018 16:11:12 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" , "linux-kselftest@vger.kernel.org" CC: "davem@davemloft.net" , "shuah@kernel.org" , Jiri Pirko , Petr Machata , "roopa@cumulusnetworks.com" , mlxsw , Ido Schimmel Subject: [PATCH net-next 05/18] selftests: forwarding: ping{6,}_do(): Allow passing ping arguments Thread-Topic: [PATCH net-next 05/18] selftests: forwarding: ping{6,}_do(): Allow passing ping arguments Thread-Index: AQHUgCJ9zia+zyEx2kS0cFlQBAo5Og== Date: Mon, 19 Nov 2018 16:11:12 +0000 Message-ID: <20181119161006.5405-6-idosch@mellanox.com> References: <20181119161006.5405-1-idosch@mellanox.com> In-Reply-To: <20181119161006.5405-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0601CA0031.eurprd06.prod.outlook.com (2603:10a6:203:68::17) To AM0PR05MB4978.eurprd05.prod.outlook.com (2603:10a6:208:d0::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR05MB6225;6:g5fBtQ31OV/EQTJngmkypmUVR2vJsy1MzmvqXT0RR6m18Gfix0IyngDfDoPwJBYzKMKkySPaCcQAZ6mpZyKSc/ebZgeJ1JgoUpsBdXWUe2va4C47yjIzDN4O36GY0DKvEzUsplFI/byd7UyjsP2lcg+1Pt2Mrt2WnA/ocMG4kL6VvYAKcjaVSQ1+7O0iUG1kgEilUlqOHXhy/7g4L9hWbMv4m/fRMzybxjbzE16XMyTlwUe3NtVgR+g+3z1Oo0L5RYhdPrqJ/XhqE/mUowAqxUGnXSzJp6adUND6mBMfBEsIoO39SQkV9RaxE1PAAWOPeRhbLrvsP/e24stHWNa8QYsbXWBsC/PYlmWLwvURyNA/eksJcbm+XV5R6QA12w4TiAoBMoURmyLeM9+K8wWn8Q0FqN8DeneCUVh3lNT+hZzYJVTIBDWhHfZojBoUj3e7t67mqZOUCJiWQxZhaodN/w==;5:9g9dtMRg/AUc4s2EuY0wangnV+Qi+mh4i4MduE+1SQx7zdhIr6BuaWBtSqJ7nCegXm3gIqsyAD6LQHjCcn8zccvirkl/xgFSJS0emr8g4sXCfcuB7ptEmBKOPuAluVXSGe1a/tZlwipnWo9Hg3TXGNLeCXbShOfJrPYU1KIKrLQ=;7:eX1Oto1szxH8Jy8Rp7pDq4wtE9EPuRHm90T0Agi/bkF18oiRmRNjW6bUcIBHGewMBBt1ZDGG1xy8vkt3P9sCQIKdw4OiU92PArOXBokyuyj4xY+N0EpTzXqO+XVX0XR/yRcKqu9mHwmHhR47NQ0lsQ== x-ms-office365-filtering-correlation-id: 7c13a855-942a-4bb3-0052-08d64e399fe5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR05MB6225; x-ms-traffictypediagnostic: AM0PR05MB6225: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231415)(944501410)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:AM0PR05MB6225;BCL:0;PCL:0;RULEID:;SRVR:AM0PR05MB6225; x-forefront-prvs: 08617F610C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(39860400002)(366004)(376002)(396003)(189003)(199004)(71200400001)(71190400001)(478600001)(110136005)(54906003)(316002)(386003)(102836004)(14454004)(2906002)(2501003)(107886003)(26005)(97736004)(25786009)(256004)(4326008)(53936002)(6512007)(105586002)(68736007)(106356001)(1076002)(8676002)(186003)(3846002)(2900100001)(446003)(6116002)(6486002)(7736002)(6436002)(486006)(305945005)(76176011)(52116002)(2616005)(6506007)(36756003)(99286004)(66066001)(81156014)(81166006)(11346002)(86362001)(8936002)(5660300001)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB6225;H:AM0PR05MB4978.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: nZT2ElfoieLKtXHHxpyPKTr31RC5xsKBDCudBkjUW8R932wJcaoNApz5hbpamw9UwBXSaRBhDtdXWeCUucjaMLf5tzlBlgv4q3vqgs+T18y7qUi6EteLkuv0ys/d5JilY39K6rCM3DOz0CTonKYDF6RkKLkP7sZcE4VnV/9C3pdSJ3pceQ9jeNK84LhvXL7fni0G4mlREXkzr2d6V9nWhxx++z2zGlCiJnHWHSM7IJiZ/1+Xf3GpifacqbCur9/PM72dXvCeEoe7P7d2Zz/FeWbADcojSBevCMaVecMUbhmhv/L7kmgI2rRuq/0HZ9+k02lKWA4RcWpo0cWzbHe9JIIkNHrOpaEPBOl3/Pt/6oY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c13a855-942a-4bb3-0052-08d64e399fe5 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2018 16:11:12.5853 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6225 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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=$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() @@ -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()