From patchwork Tue Apr 24 09:00:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10359039 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51E8B602D6 for ; Tue, 24 Apr 2018 09:01:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4287C1FFE4 for ; Tue, 24 Apr 2018 09:01:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36F0328174; Tue, 24 Apr 2018 09:01:43 +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=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C527824151 for ; Tue, 24 Apr 2018 09:01:41 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40Vcl71v0yzF1Rl for ; Tue, 24 Apr 2018 19:01:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="sRtx3dKB"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=104.47.2.78; helo=eur01-db5-obe.outbound.protection.outlook.com; envelope-from=idosch@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="sRtx3dKB"; dkim-atps=neutral Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0078.outbound.protection.outlook.com [104.47.2.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40Vcl11srszF1RV for ; Tue, 24 Apr 2018 19:01:31 +1000 (AEST) 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; bh=YV/FR6Xj64DX5tyuB390YDkYK56u7fisUQFwyU9TkCE=; b=sRtx3dKBsyJi8X0oYkHyVhsxfd0b5Yh03d1gPdzCGTUd+zk5qPpIdTQdnyPlZk4bLRHDPnt5eIpBKFQmqVVZco+9QslNn8UKnDAZ3f4tIiLC7UaOZgMfEcCIZC0lyGrlnxpBNKUldjs2toOGUXlz/EyuheFaeApf+KqX9apSBLw= Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none; mellanox.com; dmarc=none action=none header.from=mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by VI1PR0501MB2335.eurprd05.prod.outlook.com (2603:10a6:800:2c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Tue, 24 Apr 2018 09:01:22 +0000 From: Ido Schimmel To: linux-internal@mellanox.com, linux-mlxsw@lists.ozlabs.org Subject: [PATCH net-next internal] selftests: forwarding: Allow running specific tests Date: Tue, 24 Apr 2018 12:00:59 +0300 Message-Id: <20180424090059.23930-1-idosch@mellanox.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: HE1PR0402CA0027.eurprd04.prod.outlook.com (2603:10a6:7:7c::16) To VI1PR0501MB2335.eurprd05.prod.outlook.com (2603:10a6:800:2c::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2335; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2335; 3:/aYdVYfnO3MGmpMRN1xrEwtqlOTsOuVQ3T1yOYLBXn8Bc2gOsRfKOgjASWflI1nJvq7X7iUgYrsXB9Dyuei7lp9LBKdOtnE+I3XlOi2PoQ2MIPh6ypzSa2VfWIEj8ClBOjK7dPdA4QIyKn8kByRtBCSWKeffqwE3ZzA1WLsZym0jzpvT/d8y91XUgG0s4eOe3pNyzH994NsYhZUYKFrXIbxwfkHDS0AQR4LgXoC/H1spT/EcnqMzAtTCsPOXKmNa; 25:e8XaXeOHr9L+35+zdAQGLbv20fx6kBiJRbxP7XzfltU/78mbFGRmGkeB95gfVeUacUhYD1sJ8nsj6/u/XE8gNYJiOZyZfKwxil39aC2j/2l9dDhoRtzSyHZFOB1CJqqu+fcpDEsbn7qgjJqtA/6JJrrn96BbR+pVbprIPjfQ/59KZcmQlc8jj6Q/BrCGfyViiMI1B8w14AJcAq5gqwAz+PC/T1aSoTfFIJ6Y0O3iuNEnUL3Sd6u9ni6G4dgW6s85Tldk36/7SH4ibEjVtBYpa9nbFPD34rSeqoKPdYw4I+zd+VKc7EP7ot7J/44gZDAiU8w8j+Z2Kp3F2NpMD/rDUA==; 31:8EfQzKxYracIlQtVGdLu7qHdJwHyYHV9jgV8m63on1EomU2q2q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-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231232)(944501410)(52105095)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR0501MB2335; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2335; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(366004)(346002)(396003)(376002)(48376002)(4326008)(5660300001)(7736002)(6506007)(25786009)(2906002)(386003)(316002)(86362001)(36756003)(1076002)(305945005)(6512007)(2616005)(956004)(66066001)(476003)(478600001)(107886003)(52116002)(16526019)(3846002)(47776003)(6116002)(50466002)(6486002)(26005)(81166006)(16586007)(53936002)(50226002)(6666003)(53416004)(8676002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2335; H:splinter.mtl.com; FPR:; SPF:None; LANG:en; MLV:sfv; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2335; 23:xWQ7px0PSpkKU+SJX+5NfO+Texr7Q/2BNrRhNGZ?= =?us-ascii?Q?ARhlzMVyodzabHfWTj+bSnTbmk6tEkuEJAkEhDpkb26767m49ud9WUJa3JXx?= =?us-ascii?Q?8bpMt8nfOv7JBArFyuToflibobMYJbRUj37TQ7xhZ2FOiZv7CfRdNYZBD2pi?= =?us-ascii?Q?wicyWzKrP7krNTPRBwxSAxBXNYDViX6CxJ4l9vOnFd4mwQsVRCWNEf1kwRWa?= =?us-ascii?Q?4Vy2nOTpKhX4N75tg22SZMveTNs5zkAjxaeqwtyU79bh/bB1vaaOvc5lhPBd?= =?us-ascii?Q?2h9qdsBavDMvryRdXpn7QIkPx4HPIOJ5F4uGl3hUWYyzTtBFjcLnSf7YIwCK?= =?us-ascii?Q?TWE8ILjKzhL/so+fkIo9cPgJaexBYt2nEctL8BePvu0psEPobMcA9SbswMQm?= =?us-ascii?Q?/EvBbvRx0UkzdQxEsaIDI6cGmAnCmbSe8NtoEhCEfVolW0wl/oGws3dymxwy?= =?us-ascii?Q?ru63gE7VRvbiBXClAbmDKUVKZnit+I/vzuX3qxAD4davnHCPB9gO+6f0ymmW?= =?us-ascii?Q?ltlvH1SyyCtpGvN3aj00YsA47mf9s+fjV6TbxE5B8YO3kpO8pnpP/wPIXA/h?= =?us-ascii?Q?+DSZYq7WevGmg4oI0MdGW6l7OOQCGhi/cjYw8/Al4uiH9RV1AIbLlvMh9fNK?= =?us-ascii?Q?t7UCWvCVSHutlBa/XB00YXakN6xlbK/wpDSqV3kfrLFApYV8mcVQ1YtJ+Q+Z?= =?us-ascii?Q?D/DUeklrS8r90vEuf62CvybYP9UvnW01Q3iC8gtrDXrdgnXAX+HWPGdy6GM2?= =?us-ascii?Q?h6ieMtumuBr0sX2hN8eSmPIlWkaUS8XFH4AERQTc215CQEWRp+V8MinENNuZ?= =?us-ascii?Q?UH0Tk/XwMTfnYCPajb4tkczicy47+lFnfl2nX1GMt7d51rMZaebS1LAMIdvP?= =?us-ascii?Q?Mf1QoCnXuxSu5vxIxeQEa6pzwk34D0NJEpL9Ncgi0Vn59toQQP53RrjdX9/t?= =?us-ascii?Q?Iox8fFhHo6TnIzEZkpiqqDSzLvhP5A2zXT1UcvmJaGQ=3D=3D?= X-Microsoft-Antispam-Message-Info: EZl1RfArS6vVaVR7P8G5WXb9kB/3DsowahGxrlJExzCTVlIxixpfx5etFdw8xJ62APGnMdFfRRf2DrwlTgSXhhJt9ieR84w4A7dYKT4ki4jydnmmi8RdRALqKP2NAU5lJrvSy5WTHIZgpxzR8Qfv0lIIKO5Bd+5KnzTuVc9NjBu+IkzmZA/8L3o9Dakj/vcl X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2335; 6:z25P7xV9QGP5KkJMOXXF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-Office365-Filtering-Correlation-Id: 7913e845-7c8e-4daa-de93-08d5a9c1f455 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 09:01:22.5063 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7913e845-7c8e-4daa-de93-08d5a9c1f455 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2335 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org Sender: "Linux-mlxsw" X-Virus-Scanned: ClamAV using ClamSMTP Similar to commit a511858c7536 ("selftests: fib_tests: Allow user to run a specific test"), allow user to run only a subset of the tests using the TESTS environment variable. This is useful when not all the tests can pass on a given system. Example: # export TESTS="ping_ipv4 ping_ipv6" # ./bridge_vlan_aware.sh TEST: ping [PASS] TEST: ping6 [PASS] Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../selftests/net/forwarding/bridge_vlan_aware.sh | 26 ++++++++++++++++++---- .../net/forwarding/bridge_vlan_unaware.sh | 26 ++++++++++++++++++---- tools/testing/selftests/net/forwarding/lib.sh | 9 ++++++++ tools/testing/selftests/net/forwarding/router.sh | 14 ++++++++++-- .../selftests/net/forwarding/router_multipath.sh | 15 ++++++++++--- .../testing/selftests/net/forwarding/tc_actions.sh | 20 ++++++++++++----- .../testing/selftests/net/forwarding/tc_chains.sh | 7 +++--- .../testing/selftests/net/forwarding/tc_flower.sh | 14 ++++-------- .../selftests/net/forwarding/tc_shblocks.sh | 5 +++-- 9 files changed, 101 insertions(+), 35 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh index 75d922438bc9..d8313d0438b7 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding" NUM_NETIFS=4 CHECK_TC="yes" source lib.sh @@ -75,14 +76,31 @@ cleanup() vrf_cleanup } +ping_ipv4() +{ + ping_test $h1 192.0.2.2 +} + +ping_ipv6() +{ + ping6_test $h1 2001:db8:1::2 +} + +learning() +{ + learning_test "br0" $swp1 $h1 $h2 +} + +flooding() +{ + flood_test $swp2 $h1 $h2 +} + trap cleanup EXIT setup_prepare setup_wait -ping_test $h1 192.0.2.2 -ping6_test $h1 2001:db8:1::2 -learning_test "br0" $swp1 $h1 $h2 -flood_test $swp2 $h1 $h2 +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh index 1cddf06f691d..c15c6c85c984 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding" NUM_NETIFS=4 source lib.sh @@ -73,14 +74,31 @@ cleanup() vrf_cleanup } +ping_ipv4() +{ + ping_test $h1 192.0.2.2 +} + +ping_ipv6() +{ + ping6_test $h1 2001:db8:1::2 +} + +learning() +{ + learning_test "br0" $swp1 $h1 $h2 +} + +flooding() +{ + flood_test $swp2 $h1 $h2 +} + trap cleanup EXIT setup_prepare setup_wait -ping_test $h1 192.0.2.2 -ping6_test $h1 2001:db8:1::2 -learning_test "br0" $swp1 $h1 $h2 -flood_test $swp2 $h1 $h2 +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 1ac6c62271f3..8cbbc796a27c 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -381,6 +381,15 @@ tc_offload_check() return 0 } +tests_run() +{ + local current_test + + for current_test in ${TESTS:-$ALL_TESTS}; do + $current_test + done +} + ############################################################################## # Tests diff --git a/tools/testing/selftests/net/forwarding/router.sh b/tools/testing/selftests/net/forwarding/router.sh index cc6a14abfa87..a75cb51cc5bd 100755 --- a/tools/testing/selftests/net/forwarding/router.sh +++ b/tools/testing/selftests/net/forwarding/router.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="ping_ipv4 ping_ipv6" NUM_NETIFS=4 source lib.sh @@ -114,12 +115,21 @@ cleanup() vrf_cleanup } +ping_ipv4() +{ + ping_test $h1 198.51.100.2 +} + +ping_ipv6() +{ + ping6_test $h1 2001:db8:2::2 +} + trap cleanup EXIT setup_prepare setup_wait -ping_test $h1 198.51.100.2 -ping6_test $h1 2001:db8:2::2 +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh index 2bd3d41354d0..6c4376289695 100755 --- a/tools/testing/selftests/net/forwarding/router_multipath.sh +++ b/tools/testing/selftests/net/forwarding/router_multipath.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="ping_ipv4 ping_ipv6 multipath_test" NUM_NETIFS=8 source lib.sh @@ -364,13 +365,21 @@ cleanup() vrf_cleanup } +ping_ipv4() +{ + ping_test $h1 198.51.100.2 +} + +ping_ipv6() +{ + ping6_test $h1 2001:db8:2::2 +} + trap cleanup EXIT setup_prepare setup_wait -ping_test $h1 198.51.100.2 -ping6_test $h1 2001:db8:2::2 -multipath_test +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/tc_actions.sh b/tools/testing/selftests/net/forwarding/tc_actions.sh index 3a6385ebd5d0..9b4acaf35cfe 100755 --- a/tools/testing/selftests/net/forwarding/tc_actions.sh +++ b/tools/testing/selftests/net/forwarding/tc_actions.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="gact_drop_and_ok_test mirred_egress_redirect_test \ + mirred_egress_mirror_test" NUM_NETIFS=4 source tc_common.sh source lib.sh @@ -179,24 +181,30 @@ cleanup() ip link set $swp1 address $swp1origmac } +mirred_egress_redirect_test() +{ + mirred_egress_test "redirect" +} + +mirred_egress_mirror_test() +{ + mirred_egress_test "mirror" +} + trap cleanup EXIT setup_prepare setup_wait -gact_drop_and_ok_test -mirred_egress_test "redirect" -mirred_egress_test "mirror" +tests_run tc_offload_check if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" - gact_drop_and_ok_test - mirred_egress_test "redirect" - mirred_egress_test "mirror" gact_trap_test + tests_run fi exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/tc_chains.sh b/tools/testing/selftests/net/forwarding/tc_chains.sh index 2fd15226974b..d2c783e94df3 100755 --- a/tools/testing/selftests/net/forwarding/tc_chains.sh +++ b/tools/testing/selftests/net/forwarding/tc_chains.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="unreachable_chain_test gact_goto_chain_test" NUM_NETIFS=2 source tc_common.sh source lib.sh @@ -107,16 +108,14 @@ trap cleanup EXIT setup_prepare setup_wait -unreachable_chain_test -gact_goto_chain_test +tests_run tc_offload_check if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" - unreachable_chain_test - gact_goto_chain_test + tests_run fi exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/tc_flower.sh b/tools/testing/selftests/net/forwarding/tc_flower.sh index 0c54059f1875..20d1077e5a3d 100755 --- a/tools/testing/selftests/net/forwarding/tc_flower.sh +++ b/tools/testing/selftests/net/forwarding/tc_flower.sh @@ -1,6 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="match_dst_mac_test match_src_mac_test match_dst_ip_test \ + match_src_ip_test match_ip_flags_test" NUM_NETIFS=2 source tc_common.sh source lib.sh @@ -245,22 +247,14 @@ trap cleanup EXIT setup_prepare setup_wait -match_dst_mac_test -match_src_mac_test -match_dst_ip_test -match_src_ip_test -match_ip_flags_test +tests_run tc_offload_check if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" - match_dst_mac_test - match_src_mac_test - match_dst_ip_test - match_src_ip_test - match_ip_flags_test + tests_run fi exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/tc_shblocks.sh b/tools/testing/selftests/net/forwarding/tc_shblocks.sh index 077b98048ef4..b5b917203815 100755 --- a/tools/testing/selftests/net/forwarding/tc_shblocks.sh +++ b/tools/testing/selftests/net/forwarding/tc_shblocks.sh @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +ALL_TESTS="shared_block_test" NUM_NETIFS=4 source tc_common.sh source lib.sh @@ -109,14 +110,14 @@ trap cleanup EXIT setup_prepare setup_wait -shared_block_test +tests_run tc_offload_check if [[ $? -ne 0 ]]; then log_info "Could not test offloaded functionality" else tcflags="skip_sw" - shared_block_test + tests_run fi exit $EXIT_STATUS