From patchwork Mon Jul 30 14:39:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10549181 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 640E613BB for ; Mon, 30 Jul 2018 14:40:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55A4B29FFC for ; Mon, 30 Jul 2018 14:40:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5401329FC3; Mon, 30 Jul 2018 14:40:10 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 792FF2A010 for ; Mon, 30 Jul 2018 14:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732007AbeG3QPX (ORCPT ); Mon, 30 Jul 2018 12:15:23 -0400 Received: from mail-eopbgr40069.outbound.protection.outlook.com ([40.107.4.69]:26931 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731971AbeG3QPX (ORCPT ); Mon, 30 Jul 2018 12:15:23 -0400 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=Qy3lV9kP4lWl+2HAuOsv4s+qs6Hrj1HpfmXB9TSaOHY=; b=x7PmwpoOvN7bn3Yg2y/xod/sAdgE0BQ7sbyb1LfpomwpErgOGMSLjnWJ5AU7qyGsF/jZkSOEZsfpgJj32y44J78+rkcjpa37NkrugcIPwHanQRqk0DSgByD0XJODhhpbAv6aV9zUNGsCWIFgrL8/7DenDKqSUg1VjCf8vsOM15o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4184.eurprd05.prod.outlook.com (2603:10a6:209:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.16; Mon, 30 Jul 2018 14:40:01 +0000 From: Petr Machata To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org Subject: [PATCH net-next 3/5] selftests: forwarding: Introduce $ARPING In-Reply-To: References: Message-Id: <9fc8bf6931e5f159ca61254639b02a2dfa5e1e32.1532961216.git.petrm@mellanox.com> Date: Mon, 30 Jul 2018 16:39:57 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: DB6PR0202CA0018.eurprd02.prod.outlook.com (2603:10a6:4:29::28) To AM6PR05MB4184.eurprd05.prod.outlook.com (2603:10a6:209:40::29) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dbe523c6-53d5-4868-a51f-08d5f62a551e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB4184; X-Microsoft-Exchange-Diagnostics: 1;AM6PR05MB4184;3:kMnsR73KVL45Y9bTN3JlNBZkh5oiDoauwP8XXexiyIgO5aME28nbv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p5g4jfQi9fPI1R1wucjKpVolRlzbUh8jHzc30oZsDZCixsMHzEzEchX3Te+x1R5wZB1ATNE/NkWU9/BwAmn0PTBvVmRNGXqgOj0nVu8oNDwKwNga488dWZTuWfPklsf7Dfd56iaSHsZt7cA/EEQcTXLZzFGHHsKhIPuljKF/gikDjC4hzlTIkXg25Sp0CCpPk2KQHdGrcQ8vRA997W6/PV6tDDUc8HSW4wuum5rQFblPuPmJVnE1mEP48WoipnhZaRxY22LDzKNb4NMDCOGNY6tdfDQ96PkzVJbjOQvsK5;4:RdtYyZH/NtwCbBcw4Wt8LWLfYFDiffBvIaERQPzFzGDEKmm2UWipL9wq8hgQtAzH6AgLydmC4EZzkozDXhLajUIYtnAGq2XklTCtmOMsdGv0NJaDwnHUaZSxi6AypzXO9pmiJIaew4z4S5jJdMvS+Xh0/PtcYo1HXTmOATLg/Y7Z2DqSFHh6KCx1hBodmK3SnCtCP31otfhuWzoOxl/VKetNKyxp/vWYqGE66/0FCQhLW5cf+tBwwgoRZBieOLcOFUMAB9swDbaQtbfB3bVchQ== 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)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:AM6PR05MB4184;BCL:0;PCL:0;RULEID:;SRVR:AM6PR05MB4184; X-Forefront-PRVS: 0749DC2CE6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(376002)(39860400002)(136003)(346002)(366004)(189003)(199004)(6666003)(8936002)(7736002)(956004)(446003)(2616005)(11346002)(476003)(2906002)(305945005)(50466002)(68736007)(48376002)(58126008)(186003)(575784001)(86362001)(316002)(81166006)(81156014)(486006)(47776003)(16526019)(26005)(66066001)(8676002)(25786009)(53936002)(386003)(106356001)(97736004)(6486002)(16586007)(4326008)(5660300001)(6496006)(76176011)(51416003)(3846002)(105586002)(118296001)(6116002)(478600001)(36756003)(52116002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4184;H:t540p;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-Exchange-Diagnostics: 1;AM6PR05MB4184;23:ZlioCBOUOiT97ajEspYm7HHbrykEF54v397V+B2cSWWuUJBskHHuxo7R/BzaaYGFlzDOgZiu0liOPPJ4MqeXZBR4BScB59N9W8RK4LGcl4kzU9a9a7Mq4eIqqF0ZGpZAZn146ZXKiAkahRbXLC2fZWgPyl0D8z81mtvsBZPcAt0RhoDBb+YRXiauWv21RMFPeZuIFAVpwWfgkhWCLM8v3MIXk1oFZD1C3UzM9Xob6FHCB1Fkc23wF+x4T3RE4R3Gu9Z34O0LpkKkrtRHtam6U3bFdudtnm/WZ7Zait65CBqbNYLRWy6LEZFo4ScbEiJvj4daxZdBI7lpcowEcYr/1942hf/BVx/LFZGX/rUKP4d5OOyapFqxKdGvBr5bNc6G6yBvmzW8fzMgX1eZbrobIvlG05HepTErGYDnTsEQNf44TGJBvo6nFtS8BaJCHUIo6ertgym0apbK8h/8MCvERbhLxw5pXtvnhUtnC/dj6A6hJQVKL7NFh4EypidkuDM2/xVv1L9B1zSMIemtREI+6/VTJ4lLJhUL5KEG7rkepDqI00HJykZiNzkYR2eCugIghTMsMPNQKATEPicLcZe9Y0co68d1Z7zDJICFAV0zXE5rXkIFNxC83JBLf1952PSTtO6eGPH49vb+2gidwwlQteqUQzkGJ93xVDDidACRjf3zMlzpo4s+uVqWEzI459oX0e6Gv6Bumw7ulnDPWZvAq+HVPHCh/4jL4xgy5RWupW6cMAupmifxIwxSRmYyOj8TyamFDSS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XZKsI0xCXD7qY+Txnvx3jCuavseRhKMtvGk2thwn/sC7MuZBFt7SQ8QQDZcJkfMlQg/I+TVNO3Jcl1zIx3ygCPmRU0CMg7m3T8LKCBk57ERw3tcGaEw8oBoYw3glSkzF4RLjSYdmm6/+XWmIR5NjIbS401tumPaipGUubZs8nN9PqDoxN7aUh1vO5UbEICNnoH+E9RnJWzyl8qY5FX7c8yEVv8g==;5:8u/FfADKMlUnCEVstApMQY7G/iwP0o25v9c8q3NlQoWJG4K7GHFzKQ2WhoxlDj1GjNq69gEu62O1HKcfq+prytpatmKHA+0vjZ7Tmo81nigU67dvFw/luz1JGxGMaWWiNFHep0TUOsLhNvBAmJbAvO08TP8fxzdoWCA9MU0DVUc=;7:VDRqIRNg70OlvGk9Ihri4xDBYj63aP15dSOwN1h36jeqnUvCsSZ7Zle9hb08D9D/i1GCwDfsdlrQ1j8W1Cwz14TyHVgdF84LNEZqTCFMqjqhdAon7Q2grRBkbzAD6EyaG4KgdIIUPvvEc9Ebt+ysh7h6okEXjRGJ5OmjX0hDzbqE/8lJA+aUxFUct9ThsynCtfB2IqZncfyFmwHy3Yk+ZfYeQquWPAAL2h3mTl9ZggJYggHrKYNtURNxVftScjmf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2018 14:40:01.5705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dbe523c6-53d5-4868-a51f-08d5f62a551e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4184 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 Instead of relying on "arping" being installed everywhere under that name, introduce a variable $ARPING like the other tools do. Convert an existing test, mirror_gre_vlan_bridge_1q.sh to require_command $ARPING and then invoke arping through the variable. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 1 + tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 3a4eba4f0d08..843a6715924f 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -8,6 +8,7 @@ PING=${PING:=ping} PING6=${PING6:=ping6} MZ=${MZ:=mausezahn} +ARPING=${ARPING:=arping} TEAMD=${TEAMD:=teamd} WAIT_TIME=${WAIT_TIME:=5} PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no} diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh index d3e75bb6a2d8..204b25f13934 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh @@ -28,6 +28,8 @@ source mirror_lib.sh source mirror_gre_lib.sh source mirror_gre_topo_lib.sh +require_command $ARPING + setup_prepare() { h1=${NETIFS[p1]} @@ -149,7 +151,7 @@ test_span_gre_forbidden_egress() bridge vlan add dev $swp3 vid 555 # Re-prime FDB - arping -I br1.555 192.0.2.130 -fqc 1 + $ARPING -I br1.555 192.0.2.130 -fqc 1 sleep 1 quick_test_span_gre_dir $tundev ingress @@ -223,7 +225,7 @@ test_span_gre_fdb_roaming() bridge fdb del dev $swp2 $h3mac vlan 555 master # Re-prime FDB - arping -I br1.555 192.0.2.130 -fqc 1 + $ARPING -I br1.555 192.0.2.130 -fqc 1 sleep 1 quick_test_span_gre_dir $tundev ingress