From patchwork Fri Apr 12 17:03:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 788460 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BB0214D29B; Fri, 12 Apr 2024 17:06:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941573; cv=fail; b=Dd5MAzf+TLEZHSfKPDOnKC/Nz5EAVZLa5rNpcvlP163xkVUahM2aYcF4qF07KTHcGlKn82gKP8tpfL30MR9Eih+fK5f0p0GjPgfCGGTPW0MQod2f3FjhrY1iMSCG6yQ1rZGl+Ylv/KG878usfHW2t8iqnRJ2+7FrycLkdjKIglk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941573; c=relaxed/simple; bh=8noxrdO3dZgEDc8nwQylBwHRzWz1t1GIEqsjg/VK2sI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i8EMusBCHeguY4QuhGidr2NtzIEfPY33Y9mZ6sj3tQ6a424TIFgsnGlcJBdtiiASJJbj4HY9HjiSh3p0qUXXpJCKTc+t197G8XRX5pADhCPgstTyX6m2U4nU+B3k13oA3VftjRy9LWHRTW0Kh48G6gAw8egXKehj2RfaPYjjX3g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=X1HSNeH3; arc=fail smtp.client-ip=40.107.223.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="X1HSNeH3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZfQRnFxtqB/ZijjljwWMtfV/YewEsYEzIhvva+bJWUhHh3gOSOws3b0c4ZbuV8NfftjYDSTGKrjeRy4+l4abA2ptQXGjPsrKmbY6oXYgfiWILdCH8jSkSGJqRdZJEyF/Sv4H13rsxFRnxbMduAiqfNzA8w4Ww9M60uD8g1cWDAd/oaSNpCeQvODufoN2jR9LEwP5P0fEbMb6DeyL+YuIBXBbd+AQFbRUOuZrp/V5Jceekg3LfsQc8FTF3XlsC1UHjtF616wI0JdlPWTPgPc+u/Ct3dG8j0wBxphNCoZLU4vym4ZfEhcxHoTlKBV0chre8onGxTdMYVmQnTqztTz9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YT1SM2kxVq74dq4TOCc/zcAFTStTs0y0dF0oPxjr1QI=; b=SabFwGQ5aBbfBGrV+eCCpJ1jTxoE1+p1BuFONJzHxnaatR7QGr51Yezpy2fYFZPjYZaUPx6mLVu9L+ilDnkUBxo9AxRkP2WhnBn29KhDfc37BBR9KPe+GI2B4hbrjJXFuHZxAflfVWg2nshgoLwNG4aPQeabW5gHiRST1yfKX+Hz32Tz0x2PsuTcJ8BeKIdT4ZA5QU3dfR+edgL4V8EEtIi0tPsfRci1lcMI2e2MBUYMBway7O2XaSm/MgRNkn7vgSfYBP0XElQ4gfiQzlI6ZdeLlijPLQ//E9d0nUXTKVM2aq0bhKQJLj3aOD9/pXsDe2NZadgR3qEG0lzFJDsgyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YT1SM2kxVq74dq4TOCc/zcAFTStTs0y0dF0oPxjr1QI=; b=X1HSNeH3lb+HevWvXK38Yu1Um9dHIZuPENFX60U85Qn0Aw485TGdtQHw0rSpeOqWl0zpYWkoeADG/7Hi0D0E5tkPEb+rCRMf4gBiK9/d6Y6NF3B+ZvLbei3y9r3CdSju9BeXKc/2g7AcQhPgPzNl6uVqyfSZqeBJIr++7ltquvX8qOw7CFQ3l7ulSaLAgCx4YTBE3e3z5PkuOCLb9pdq5nTt70nXoUUPwWQdaE18JYaSE1OmLXVHjxnrnzB/B1ELHlKA7m53V2hYgYeoAmt8LCAQGygtPPrnTVzRQITziODtip/neXPhkLbrEu8MtPyhF4rpSR3iG6GIXYTLjBi/9g== Received: from MW4PR04CA0102.namprd04.prod.outlook.com (2603:10b6:303:83::17) by MN0PR12MB6342.namprd12.prod.outlook.com (2603:10b6:208:3c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:07 +0000 Received: from CO1PEPF000044F6.namprd21.prod.outlook.com (2603:10b6:303:83:cafe::35) by MW4PR04CA0102.outlook.office365.com (2603:10b6:303:83::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.19 via Frontend Transport; Fri, 12 Apr 2024 17:06:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044F6.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:38 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Fri, 12 Apr 2024 10:05:33 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Hangbin Liu , Benjamin Poirier Subject: [PATCH net-next 01/10] selftests: net: Unify code of busywait() and slowwait() Date: Fri, 12 Apr 2024 19:03:04 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F6:EE_|MN0PR12MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f5c886c-6422-4e96-a4b7-08dc5b12d7f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +bwK+jM1rn0PLhYFokGKGaJ1ry/z0kBw/6nqKNTVfevsL1V70Rkb9BgKUMzW6p2uCHx8YzD6PwHqfvJlk3fthWrVRM/PXm9BJY9E6mfI7acg/7ihFVRhDqCHidkVAWMlbjjcjcpBr3qYoNbbSJcKxuvBOkVqnLMyadmI0WZp04RzsfMv0rTVWodFQ9fPcADNl5tA8/cS7HSnPj6SocbC8fWzp+n2nzD29+3n+693HVqkIJ0zCf6OMpoK4nd5Xp+ePw9b0ZcSdcshVV8Wnckj43kThXABQ49RAvmg2jGCjjCbsQxHLDP4NDpLG99IQHjLKL/FfeNCZn2dVc6a9oggqrVgA0fQHtm1KM4+KktcvdEprHl1YZ9+7VLBkOiNBNJ62yZLq8w4rXU7bUW4XPg3axqXcqOQXy5ykOxBS4Vms+sqQCIdKkpqFrKaK6iABxKkgjbc0MqBrUMF49tRxwX6GlKHghLTzpqAoLmQQNEqNPUVAbYQnvt+IEWRZt+WIyr9FwdoCI/PFG6eIkN4GpZeLLijdTW25k6veq7O9nyQdHD8/zhhwpEMSMuCyp4gRKee1uG5ifLRr2DL+U4DUaJYz7kMZ5ZaBIYHrC59F+shfIuR+W+t9pmkODfBv8cET7Z8BkJzvo74rxdBMJ98xPAYP8cvCAPjIBr9W0H85bVUfyax7SLxmDZ2r0XRCan1zTtUpJ05QsNTwtc9Uc0jQc39rz9ba/hDA0GJPAVshFU96EOqUOQ2RFLO4kEhuQP9inf1 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(1800799015)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:06.9075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f5c886c-6422-4e96-a4b7-08dc5b12d7f7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F6.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6342 Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait() and slowwait() into trivial wrappers. Moreover, the fact that slowwait() uses seconds for units is really not intuitive, and the comment does not help much. Instead make the unit part of the name of the argument to further clarify what units are expected. Cc: Hangbin Liu Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier --- tools/testing/selftests/net/forwarding/lib.sh | 22 ++----------------- tools/testing/selftests/net/lib.sh | 16 +++++++++++--- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 4103ed7afcde..658e4e7bf4b9 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -95,27 +95,9 @@ source "$net_forwarding_dir/../lib.sh" # timeout in seconds slowwait() { - local timeout=$1; shift + local timeout_sec=$1; shift - local start_time="$(date -u +%s)" - while true - do - local out - out=$("$@") - local ret=$? - if ((!ret)); then - echo -n "$out" - return 0 - fi - - local current_time="$(date -u +%s)" - if ((current_time - start_time > timeout)); then - echo -n "$out" - return 1 - fi - - sleep 0.1 - done + loopy_wait "sleep 0.1" "$((timeout_sec * 1000))" "$@" } ############################################################################## diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index b7f7b8695165..c868c0aec121 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -58,9 +58,10 @@ ksft_exit_status_merge() $ksft_xfail $ksft_pass $ksft_skip $ksft_fail } -busywait() +loopy_wait() { - local timeout=$1; shift + local sleep_cmd=$1; shift + local timeout_ms=$1; shift local start_time="$(date -u +%s%3N)" while true @@ -74,13 +75,22 @@ busywait() fi local current_time="$(date -u +%s%3N)" - if ((current_time - start_time > timeout)); then + if ((current_time - start_time > timeout_ms)); then echo -n "$out" return 1 fi + + $sleep_cmd done } +busywait() +{ + local timeout_ms=$1; shift + + loopy_wait : "$timeout_ms" "$@" +} + cleanup_ns() { local ns="" From patchwork Fri Apr 12 17:03:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 788459 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADBB914E2FD; Fri, 12 Apr 2024 17:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941580; cv=fail; b=ZEss15+HIbeQLldHXCdmM8CYOQUDhhPNjTzaPhby3hVSLm7rDsbkTueOsFvyjAV41gJKZjG0RK0WeVDjW5dl8sHqs5Q16qaJAa3ix1CNb8KMSYr55IU69V7O39VHuHxVkBZf5QPIxNCNeBOroyCr35TwHmDM0mGa0kGGAxamP7w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941580; c=relaxed/simple; bh=6bIFf1z9WBQX5FUb8QkTBbv3CN4kzUaZtw/GnAlu1CY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KmiaNcF4PiEtC3qd3G/RwickzQj7AreK0rwhPakxD3Ow1trDJ9T5RNXGXEWqGEK5BqaIDqTtI1gqDofZBoEz8EdXxpDE2k641oofFUBK/hDR0aIOmkejLZ0ZlQjQ9YBRz6dut0acbssZKF3PLJhc2J2EkPnMtr6FnhvTDCtpA58= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=NVZrI48+; arc=fail smtp.client-ip=40.107.237.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="NVZrI48+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k9Ssyg/pFcikqCnvyBpC8kI1DBVXA4pjPsmtNCpwqAq2hq+xMy2WNH3imH8pf1LHVbDeuHCTmyWwzasGSzZsppx04ONIZnEHSdRz95EjMq2PC9u5Hp3DbENS0iC5DgthEAHRKNxcA6WWlzeB3YsVIvWimznLuM3Du+1XsHMT0J87SwBNiSmeHexJfkF1eMDKHDnY+ku8UL281rr/UmfhV6qEiLObLH9ktF68Ld5wgJDrMFdZe2PDNBFkfMQ1NBgb8IwYeTx0iRjPlWu6s61joXZXbHoFvYGenNbFEpEVrqh5zL2ejnUEYnRHlntjo75o6NQMal0UZaeKF3Q1BkHXdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fFwcgmFMwihHZj/7XLqErIOyS7Jeu1KoZQ0EhxRX2VM=; b=SbqoVhW0pIuTlY2BH1HCnvWuDIEbUMr8mBycETFTeT3jUYfhnNR2ktgQLPjYMk0TzIJQ+J2zjniqWu8ozN9Oi2wcuHMHaDcQrrD6BM0mKDsDZ0SBdrZktpyfcskBysk/Jm6uW8T4kf1/oJ1xBZRNED0qvWaFs1G59td6pTIs7Qz4Qo9epuZeY/Bs0WwChqViQK8iazY2SydhQxDGVDZuL6PnSbpwNX7rR+cNZP++zbjbPvOVcTdNHGwd0oPK2gcCAs+ktSFLowEvPMLF8sfeOXclEjNN9rK0s+P6IfKVtgG0TWQrGudzB8RD5OtZnPfZVNQ3yvKUrxD1nb6+aHRjZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fFwcgmFMwihHZj/7XLqErIOyS7Jeu1KoZQ0EhxRX2VM=; b=NVZrI48+2zi30YTVwoc7aWKSwfMBovZyWtPFrkwMG2EEoaM3U7cKktTkHrw4Xsesko9tvlYleyanERTIqg5l1+RpZh6i3E1VJUqi2zubH75ujY3z4M4ZBseNf21ZKkoBEwNsvdR1eVtzCNXDB+SP2x9JnGLQKVt66DJi5UXiJCLtzTvgAHSQ3Kn0iA4sbaHD1U3iXRoBOEPR6ECZo2MfzFKR0NEUjpf37lHSbi+BpF521mmscKNxJ0m1rNlClZX9804dMfT/lVcbfP0VcAvzV320DIzVFlPUQ0vTxWm9wi4Ytmn/hONuJiHXeD9+IiNYZ5lpfgg7SL1aIAOgjSyjBA== Received: from BYAPR03CA0008.namprd03.prod.outlook.com (2603:10b6:a02:a8::21) by SN7PR12MB6888.namprd12.prod.outlook.com (2603:10b6:806:260::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 17:06:15 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:a02:a8:cafe::c2) by BYAPR03CA0008.outlook.office365.com (2603:10b6:a02:a8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:14 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:47 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Fri, 12 Apr 2024 10:05:43 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Benjamin Poirier Subject: [PATCH net-next 03/10] selftests: forwarding: bail_on_lldpad() should SKIP Date: Fri, 12 Apr 2024 19:03:06 +0200 Message-ID: <686eeb760a35f228bde1392ffa3f59462223db26.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E6:EE_|SN7PR12MB6888:EE_ X-MS-Office365-Filtering-Correlation-Id: ae524aaf-1228-401a-d3a2-08dc5b12dca3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: asmaxS9Ny4wgcxqx+t227s9ygzbKcYDOqwR7Rwgx4OXxCRBjRbn1W9k2honT4Dzoj79YZW6Nl+3dLVeBypilT/QxrObcEvxspQsjcvrB44JsQhqC5iTbVam7+numoqrCOZxbMZ9zHQV2D6kDb3/cE6AFqJ3Ddc4CKnYm9drRpsrpoOg2N+7wMUZ/6jlD9Xl+BuRJWb7CQO+KDvb8UJO2kxTStYeP7n1TOtT47VfdvvEmqdBs0CkHv65cIYiGfo5hYN0xt1dBuFe6jfmYVZrWtMwGjA2+JyZOdQgeQ0yViEL6qGGzb9fRIlDs2dVVHz76xRnb3H7kOCbz9LOwnzjCTPDJ1KGWZy+tS+DU43RtlNIK42rv4DFls7tlE00jZtPRQUsNMVJFWMB/8FAF9YLO8f6r8uwyr/UCVNo+hw+Gef+NS8/xSFnjMubM4WbuigFmtv7b4d9kzEbnxkMt25JY/qaU2iuzOW8ZBnmWQH08QW+F9ndeld8rKs5nAA3fm5+hGLjA6ygf1mAuLaJWmjqGkRzIIU8u8JdL0pD3fFB7i69OoG3KS8eetBfwUt1k3e5MlGpVLsHFMtPmuZzsPw4xw4H6Jgq4miQiZJSubBMmfj5JotAnDq4LjKiiEGe2F+UdZhkrbze/YxqzkK1Pa22FHOdhvccWWXBM8V0iUO5U2vgSryLs7PYnlnXIR9H9N6/duMnT3R0cyp6zoCjUojAtHey1cB4jXCcRDETTn+pVpDHRnyBSCXPtORlZ4kUPCAqp X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(1800799015)(82310400014)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:14.7312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae524aaf-1228-401a-d3a2-08dc5b12dca3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6888 $ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have bail_on_lldpad() bail with $ksft_skip. Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier --- tools/testing/selftests/net/forwarding/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 3cbbc2fd4d7d..7913c6ee418d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -2138,6 +2138,8 @@ bail_on_lldpad() { local reason1="$1"; shift local reason2="$1"; shift + local caller=${FUNCNAME[1]} + local src=${BASH_SOURCE[1]} if systemctl is-active --quiet lldpad; then @@ -2158,7 +2160,8 @@ bail_on_lldpad() an environment variable ALLOW_LLDPAD to a non-empty string. EOF - exit 1 + log_test_skip $src:$caller + exit $EXIT_STATUS else return fi From patchwork Fri Apr 12 17:03:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 788458 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 544C114D2B8; Fri, 12 Apr 2024 17:06:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941591; cv=fail; b=VsxQINUFABMpCuRwv6CVqqjlQKUkS3uXDpaOf3fDmUN66EHEqf+6WS8Ly9yHvXwcVGzZaBYdiYlnLsoLrEXszoj8Rx+zg38QOfeuvjE6cNZ2vGSR4vrKBJAWcuaRQ99o2kDI5xixcmAZK6AnN7ypuBo2CTKxA4gaeX2Ev7ZB1Qw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941591; c=relaxed/simple; bh=Og6QjflOjmOeoJbUzIPNu1OEQuH2Itk/muhQU/LMNPY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kr1EZOPMTWTGTSj/YeAkszEsx9SaZ8BmYKsxNR26+QRGm3PLvKuy7KQn7aG50oYvVniu1zk00UtFkMqOkJg5XDmJBN42HsEtXhGBH9NNGwvRl5NfnWGs61bgdTaOjogiX5nSZl7rU/p0RNhq5F/OwioXK7MA/XN18jH1w4Gef+o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=fiJYN71m; arc=fail smtp.client-ip=40.107.92.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="fiJYN71m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i8qIGgU8GU26Z24nc2ym1+azNbH6PDKHDQ4zYaiElxmJPzkaT72DztE21Y4SDVvmpNC9+7ksxcqmZqq8PMPlisG/YbhipGP9G6s+bl7ssaY/xXlIelXS6TbnvmM4hKYjU9mz1A8CAbPHmeyZAsh1eaOXOd4Uss9asIdiYMR3mNAQTApWsX6C/FTst5ojNh0xhRznHdbkVYhDiOxGsTwMn3365Dh3znxLFMi+ika4D/NdQnBpDBxnR1f/iCFXWwbuPTodREikfeKECzpyvh7sUmGXNULZtlHD7bb5kW7+UkiY1Vpz8Bhydhl1WXbMw5kE4zuo9b7SW+KdLO8RHO2NaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XA3AfIu2I2c3AWt7gR+Do+pAAFoeTS109baHHny/clo=; b=DxknAZ7Ac6VMB1BG0DMfEm0dyxGv9OTbaA1eS4fGyI1RGRnM8jnLnm1m4Jm5bwDCO72c0He9BCH1/GjF4sr4JfYR18hqGybT+LLEtmoE+JgaB58T4WaBtc43YMURqvr4MlpY2G0iYIBuzpz3aFeTgYltQ5FQIK6zJi/BmE6sLHNm9LaB02HLDqoxu+KGukMT+Kb9kd5lpHtqUKLaIqRFvtRzO0Pr19BpsNYsmbkG3Hhot4THw7AmYbGHOjoOPzNHJQbVfOjt4kGMOyHDb9+onsFFhAwt+hcZzVFTZBHHmR5uaZB4H9Fn82JqfzzzEoAOrXzNymwPYW9ZfeGo18g+3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XA3AfIu2I2c3AWt7gR+Do+pAAFoeTS109baHHny/clo=; b=fiJYN71mLVpZpAjxhNkYSA90XyWy7WvlQrC/9eBSeSiZe7zWvcy2KR7NU3m+0T1/D+p4HXEtUT9+6D2N89lyC8e/hpsAKX4Lq0e2V7JZq+6LQsj22+usmokHaWJ25ZKfiNJR1mcPwqBClbncF7G1Ud4zryFXi5ESsA+bSzK6KYHhmpgxFsBueKqO7+0b1S1KVxh7m8p2NfNjeG/h0NpKIsGH+AejkqzDU+8376jxAmAk71AZb0lN1Bb9U9oBYFWRG3RINxqhXsHIgmh0YVDsTg1Fr5WWB8wjfd2q1flMhRQPsmBkB7nggW65EKMhYAJHOgQHmZas6yeAl+rT+oB2WQ== Received: from MW4PR03CA0186.namprd03.prod.outlook.com (2603:10b6:303:b8::11) by DS7PR12MB5743.namprd12.prod.outlook.com (2603:10b6:8:72::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.54; Fri, 12 Apr 2024 17:06:26 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b8:cafe::87) by MW4PR03CA0186.outlook.office365.com (2603:10b6:303:b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:57 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Fri, 12 Apr 2024 10:05:52 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 05/10] selftests: drivers: hw: ethtool.sh: Adjust output Date: Fri, 12 Apr 2024 19:03:08 +0200 Message-ID: <808d917f83511c89165dd614f0d6a1174c92deb9.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|DS7PR12MB5743:EE_ X-MS-Office365-Filtering-Correlation-Id: 57ab682e-2096-4e8f-f0ee-08dc5b12e32f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wJNGnuRhX3wGwO3WtUagGgPN5acx2nNeg3wioDEUD9C4SyYWnko7umaJw+ZiI3nt3G0t4JPk5wRKRGj3eRsMnXh2kqKEMNellCXF677TBRTwMd3r4gW/tAI7HnibD5dmvLRj0AmVCOd2iupqm7DQsFkbNony/yUTL0TOMG1wnM59LgWdRlVx9UPToGfa5mYItIT6WOvFv9oI0ec3a4yZa1lQoYYMiauvpgiyUHv/hpqSrdq78OQM1SGq9FYJGYgLWbyB7nlA960ITTf275bhEH5tsfPx1/u7r0TP+QU+AE/tBt9IMFD5pev9DFhH8W4Jcj5RoMKT/YEhUsGCsiUJNB6w6r04ylCiLrO6PFzcWK2H7eBHjUS+fWGCHokbb+W6vWRR4FyLI9uGcYYaJ/8D9Vzh75jZFIc4PRemQyV43lR231mr3+OuURpGBwFTIhx/x6vRLYs+Q8trj925+wbRnL1TF6NZbo/ZmTl/hNDb6HtQHT8ua9WSjPfnaXbQYW9oJJxKQ8c7n/7yo9E2Goe+xP2va5cDDTHz1Ki8HdokQVBHxGqdKVq5S711GY5f43sn98OoAgABzUzO8IrCQOMjO8/WUHBqQaKsfkKOnx25+t5Hh3RQ774iXB8M0TbGjFmACrW1eWvt7oD8iOfWZ3z8//u/7kt9WD4IWIuiTPJuX1GfJdp1XZfYAfs+p29hdf37qH11cJbyVZefWDIyZVKe6jec82+MHQZbfaq5SocTY1q207tfXvotCoFlPJXtOXjx X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:25.7314 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57ab682e-2096-4e8f-f0ee-08dc5b12e32f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5743 Some log_test calls are done in a loop, and lead to the same log output. This might prove tricky to deduplicate for automated tools. Instead, roll the unique information from log_info to log_test, and drop the log_info. This also leads to more compact and clearer output. This change prompts rewording the messages so that they are not excessively long. Some check_err messages do not indicate what the issue actually is, so reword them to say it's a "ping with", like is the case in some other instances in this test. Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/hw/ethtool.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh index bb12d5d70949..fa6953de6b6d 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh @@ -65,9 +65,8 @@ same_speeds_autoneg_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "speed $speed autoneg off" - log_test "force of same speed autoneg off" - log_info "speed = $speed" + check_err $? "ping with speed $speed autoneg off" + log_test "force speed $speed on both ends" done ethtool -s $h2 autoneg on @@ -112,9 +111,8 @@ combination_of_neg_on_and_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1-speed=$speed autoneg off, h2 autoneg on" - log_test "one side with autoneg off and another with autoneg on" - log_info "force speed = $speed" + check_err $? "ping with h1-speed=$speed autoneg off, h2 autoneg on" + log_test "force speed $speed vs. autoneg" done ethtool -s $h1 autoneg on @@ -207,10 +205,9 @@ advertise_subset_of_speeds() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" + check_err $? "ping with h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" - log_test "advertise subset of speeds" - log_info "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise" + log_test "advertise $speed_1_to_advertise vs. $speed_2_to_advertise" done ethtool -s $h2 autoneg on From patchwork Fri Apr 12 17:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 788457 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2078.outbound.protection.outlook.com [40.107.220.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96FD614BF8B; Fri, 12 Apr 2024 17:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941597; cv=fail; b=oOhnjopEhYA6cBOTJtTAHNa4wm9Zz99Te0LDrEB7F6PmEWPbuz+CYbeztbop5Y8Nrrr2Gv/w7yK6/u3sHasdX58djl51fHNNSK8SuYG+5/DIirv8rLEq/BY3ie4Et4A11f+pEzgx4eBx1hBvsSsXpy5n/fXmkVzXzfglccc+YCo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941597; c=relaxed/simple; bh=uVGypwbb8hmhOJEtmBob2/abQMsih5uxvVTdKpdQaKc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WqJ+3b67SKsgnoYwjY9MW7lShPNISli20Lkjol5ibEwuNQJvhl+c+EU9oqWojnxG8BkIj9dcy+C3ecI2G4ZJWuzsLHha3RtjL/keqLJW9lYJTPxQ6Mkz7fa2WsJHnyR6ZFEL5Vkg8mD+0u9VxcBLH/FuJahI3JTMTdmpXl0QGy8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=VQkYEX4a; arc=fail smtp.client-ip=40.107.220.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="VQkYEX4a" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nLAcq9zRPd7Q+erYTCuLBlApmsPP3V1jPBG7sPGvOIpUaC2Nly8PFHz7PIUWbv314tUhabOnjPzLV+hHx4gOwib0PHnaUdKODv3Y8ntiScMEufFOMjpfQc0Qwfi5OCMJ8CFVlycWIbeCa4trngi99U4+Dn00xcaY/ZsgqNQh925i+DeUhy/JIKWSrEXYxHIq0B+ZwFz8nZslayYPyNq5S88SZtiLVmLXbv9+ovzEeTKFfo+nfVFn075Y03wmE7agHPreYtcPYS29sKX7cpcOYC1BuYU49oQ8MwaNtjVrkb0R/hrL7g7wKmSW7JiKJ/QgAJ48AMlr62jaDYD0ssSUtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GxKFHqpHALHjJTLaus8lMS+E5wEnDG6gcRAaDpR5tVc=; b=T/7rG2kaCdgaU9rfEc79JcQ3IYLrL0X625ZPqna1boxdAwi6FGP/aE/k8YelSXpB5xZ5fU1wEsITCLOVheCTvpXnhj9Dsjoudt/hYLqIoOEr/nccbv6rAicAwzePkbvCFDEzVqcqvZpfFsI2X0trILppuBIEmmrivvky22tAeyvnDtCnqpxXLyoAK0+U9D/noow7Ey8wFdodHZJlyhWRDY2cZpwzh0XXE9r4wjWOvDYTGP7hSHZ4Ll4/AY2XXO3VgRqTlFvlU1+4Iu/+ttnNGErxxz9iaHvWKZiKQr0huJDO5EABbA7lUEc4JyBk4UoMqIrdRsjecdulToYig79uhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GxKFHqpHALHjJTLaus8lMS+E5wEnDG6gcRAaDpR5tVc=; b=VQkYEX4aQc+RjOhPJjftzBHujs13zmqrPCZ1ftzP7dJzZ12UN5zBuJc9tLB1oDs546h/vGZK54NhUG2SUunKpbAQ3qtQTAqt5w8sZToEWX71EzKF1OKTZOhwXFHFOuex7yiZL9tLOaQSLI549XKhrUqvCBnZ2kJN2tt1HPr15Dv3pggc5sq1kN3wT/3Nv7BcPVzV5itGyDYAOYwOCmwGzXHBswax3IyOji7tuKc2lZprl99smh+QGrJ5bEbmGojNoeoisxIrCh4N2E6jhUU2aZZIfd5Qvcr/mh8YtYfwuiCsrfb9bKtWB3+25sFYtE3G9nMJC0y4r8gQOXdLuG2MSg== Received: from MW4PR04CA0277.namprd04.prod.outlook.com (2603:10b6:303:89::12) by PH7PR12MB8108.namprd12.prod.outlook.com (2603:10b6:510:2bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:32 +0000 Received: from CO1PEPF000044FC.namprd21.prod.outlook.com (2603:10b6:303:89:cafe::7b) by MW4PR04CA0277.outlook.office365.com (2603:10b6:303:89::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044FC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:06 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Fri, 12 Apr 2024 10:06:01 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Danielle Ratson Subject: [PATCH net-next 07/10] selftests: mlxsw: ethtool_lanes: Wait for lanes parameter dump explicitly Date: Fri, 12 Apr 2024 19:03:10 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FC:EE_|PH7PR12MB8108:EE_ X-MS-Office365-Filtering-Correlation-Id: 5333ecef-7362-4ced-d2db-08dc5b12e6ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ffrYXz/9hcewUEiEikm11MWMZnE5va8Up28N0aTkUq9niD/gi3x9ChsyFJqDJjyYAsGa6dYvxuXmf3iHC0/MQrVZEjBGkoqatPfUJJWsL0nW9NQRgYAZBIkmg2AQUKeG7ibsd5LwqInVvCYwWxfJJWdTrAtw8RqJQ5fdLjJ94pU+ef/+Oa5egOGi0IQq8LweKxdoU7P5XvCrZldPO/3WedkwQTMk/nH9slPrPtxSpqUD4IQEWu89wcnCHVdL6h6GbSD+4q6kSs35hrbXYq1fzk3AALAMKC7RUvcMrTdym/Z4/hdUj4OrSDznWm1CTbktg0TQhdKDsiR75QzyLVOfXmwNVvOfo4CZSgJ5gPh8m9HtCLCh1y1RULLXoKlY1vbt4YUPc681869CMat5aUG13cIGsWqJnHZUPg+jpDC48Gw62CsfdKbXW1ugZOaA+01Sb/7KGwtwouDhb5/y8Rz/eD/s6Q/RhqenEGDiU+IxtwYKPcB/CbfvP6WLoquv0S8U/yvG1Seg5Xdex2jh1GuZpwWrtlxIWJxdvub0wu9U/JnK3upct7qTF57kNz0ZL8CivIxkDnzqLjqnVG8RaQW7/VVM5gDP+hPVCOH61qe0A9TOd0/SrjcHo/dUVLL0UbHbRCeQ/2c5cKxWtBnHU4xmgzfPmG9pTZ1dCPGkc/Em/HZ8zt0tYMlqk43CylR+LxgbBHP/EAsLvpzhJRUZpnH2CkFyo2rqgKEYU1J9SiMq9XlzeiHTGarfemaOMpqs6ADE X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:31.6747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5333ecef-7362-4ced-d2db-08dc5b12e6ba X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8108 From: Danielle Ratson The ethtool dump includes the lanes parameter only when the port is up. Therefore, the ethtool_lanes.sh test waits for ports to come before testing the lanes parameter. In some cases, the test considers the port as up, but the lanes parameter is not yet dumped although assumed to be, resulting in ethtool_lanes.sh test failure. To avoid that, ensure that the lanes parameter is indeed dumped by waiting for it explicitly, before preforming the test cases. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata --- .../selftests/drivers/net/mlxsw/ethtool_lanes.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh index 91891b9418d7..877cd6df94a1 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh @@ -24,8 +24,8 @@ setup_prepare() busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 check_err $? "ports did not come up" - local lanes_exist=$(ethtool $swp1 | grep 'Lanes:') - if [[ -z $lanes_exist ]]; then + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + if [[ $? -ne 0 ]]; then log_test "SKIP: driver does not support lanes setting" exit 1 fi @@ -122,8 +122,9 @@ autoneg() ethtool_set $swp1 speed $max_speed lanes $lanes ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time" check_lanes $swp1 $lanes $max_speed log_test "$lanes lanes is autonegotiated" @@ -160,8 +161,9 @@ autoneg_force_mode() ethtool_set $swp2 speed $max_speed lanes $lanes autoneg off ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time" check_lanes $swp1 $lanes $max_speed log_test "Autoneg off, $lanes lanes detected during force mode" From patchwork Fri Apr 12 17:03:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 788456 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2073.outbound.protection.outlook.com [40.107.244.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3BD314C59C; Fri, 12 Apr 2024 17:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941605; cv=fail; b=MKMX9W0PKfoDQPRxhYaRWgrcSZ/SOgH+VaaxOpygWhaIYlCYaqGys9d6ABm2jq4wKYX+VDis6DKM8orok9/WTtxb/OWKotfffTMfsYdIj8qZADQQUjXXenlsMX9fjK1S5BbvzpqENEuf/gP5xf/3LRELl3jwATN6dxAh8uo/qKE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941605; c=relaxed/simple; bh=YovImiEkCulziGNFgl7hZ6SCeabUorxWzJ5kjmeQyBA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a3YGC//VmX4cEelCOeBgQnnbQw3riMc3zce46jl9PlO5JgpQI9VgqbYaywf6wA0SNrp0vpP7S5ZmuQyuodOABRQvLCNtpODtmsgO1prb95hS9L1Da9XRC8ARogqJ+jpupb0DvuMwC8g4rosEUJoIdGbjD4F83A6vDpC3ziRR+b4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=fEi0sCf1; arc=fail smtp.client-ip=40.107.244.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="fEi0sCf1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hgVjyEiUyvqGZC5LCRJATfcInmiT0eYGZlUOusLU4c7o0jG8WYeEJRJdydqUb7AKGk58Tet8t+dMtbw0/3p+WYZSgdVi5xU41p/11RshDg9iHkkjdp99+voYi3BztdlhNtJfT17fb4SzhFqSMZ+ohwdpvfGPUHhhkrDtoq8EIl0yPFw0HkWl3wvrdCoeOp3DQR4i3ILSVXd9dBy52+YgqSr6CqgzKHd+4vqGeZXWBKIDDX5E+fvqYO1BrCppVAkJzZF25gqOet6+vVAGPSyHKB8byRUCneYscMx4YDXca/5RWvJxGGdWFYoTvPShnhUbdguHr2FEcRhgFtUPVmqM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2GmEzfCsAiZ0tyfsN3Gxle0b0D42N4u0gy75qqqTpo4=; b=JK36X06+YgWjqIlftQppzMTbriQhfSm8XnI6fKad5paa45Iu658fj0xncgqfeEnFUi1eGOtAJE5UC3h8Qe6EwlNY1btACcrqzyvIGV8IImiE/o44xqKe4AuCe/ZcBATZqngD84p2bP4YfhGyfZG2IBjqwzlCvDFc7suvyGNTG0BQMlIBnfurSeeTNlwT1Rms6d2iT/AbhGSADVz7VeKgooiXSMp3M46punS5EuxndMVm1Y55ZuMby+PoA0hf7amsrI68s5z6LWa/OlX61GxmKaL7Mw2kSQ67/7RWbg0oqIZN8HUi3XU4nLylcZC9zTY3LRsQy8eNj8cjszWZChcF3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2GmEzfCsAiZ0tyfsN3Gxle0b0D42N4u0gy75qqqTpo4=; b=fEi0sCf136HfKwVB60sCWQUJEpMA5fyHW+AceXzn5N0M7p+hBuPNv3ZwJuxw/m+jdf9300TWcbezCqP8r8cc4e4jxVtKf0fVaSD8h6hKXwDLSQNObrgGO5X+jr8flI6RPGaN+0x7wdqx8xd9Sj9BJRaZxfocGJMLGUBXjPbQ/R7C8GLHJSi4zFmVJCNDn2dLhJipTMjZwsVHqn+WAc8FnFsdPIywNbkg/tv1+WvUJHZGwtoCltEqfAkZeABjQj8MIVxe/yQz8IbUtBT9Rl8sMrtb4gmcbwXrgvK7LWSj9oKs6RjmF62tBuYFNa9XDwRM/0Vm2rcpLpZNLAe3FPMyYw== Received: from MW4PR03CA0209.namprd03.prod.outlook.com (2603:10b6:303:b8::34) by DM4PR12MB6469.namprd12.prod.outlook.com (2603:10b6:8:b6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 17:06:40 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b8:cafe::cf) by MW4PR03CA0209.outlook.office365.com (2603:10b6:303:b8::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.21 via Frontend Transport; Fri, 12 Apr 2024 17:06:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:39 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:15 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Fri, 12 Apr 2024 10:06:11 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 09/10] selftests: forwarding: router_mpath_nh_res: Add a diagram Date: Fri, 12 Apr 2024 19:03:12 +0200 Message-ID: <1a34016962a2678462c656516ad90d4c0b7ae258.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|DM4PR12MB6469:EE_ X-MS-Office365-Filtering-Correlation-Id: 396e08b4-aaf3-4504-f0de-08dc5b12eb6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /gwSb538ZIwfJSFSIgzi1GpJj5TLwsTq3EFADeydBGWikmiPU4WVs7rClYVFmzx6OfCz5UOm76XNAW3k+hAUWv9Sg1OjoURz2N3TaNnmIrBZEFgs2mnbUIX1hmgdHWnfn0fIqoGV/2Mgci3aStJI7V6ZrTxyPjV4RzAZ+8dKB4kI1J0U1ZwaGT9t0zaJ100ZvJMEkMgNdUWwiFMD9c6SkLarKCjvS9Na064bp97Bhk+XhM+VpwE8bNJsVzDYAySOS0GPQsdGHzJEX5ofLDoa+GLjSzCFflYHO8ztupfhh1ZlE/yn1nLFvJWZqRiBjXzLv5q9L8Z+21Xth3ySiX7PXzqLwJ6TlhWPAMpagbxhi52ny7gJHj1zgoSDW3bVf4LLUJetEjJh9Ii/49Uk07INlf5eaSlYknPHObu/yMdok9IjXEXO1FDu3hCPuURY3z2bljLSinSNghsU3JSWYBx3yRI3JWDOX8XiaIWMMCFF20l+J0+gsMVkFN0vRiEXeJCeGO+Gi+eO61ion5Y1NcNAovIYvQ3ZZtgorTFWBTuRRVqLpKrkfypocta1COZEuZF9XpjXWytY0xV+8SHpcOTCzgc12lX5g7uZ5L6Bvr2hcdxG0xBjzeqJ730DB9WGDvV4UhVJqZz/PEJ6q3825DLnLzNSnLCY2PVOVcWpiYjWqmnK6mgYtoAlJTvxjWckC4FhZIUj6bRJDu1/ihUd+z/zcvK2hJo1q/Squ7i4I02WUdhRvehBdWlhI9z1EFZ4KuPm X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:39.5126 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 396e08b4-aaf3-4504-f0de-08dc5b12eb6d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6469 This test lacks a topology diagram, making the setup not obvious. Add one. Signed-off-by: Petr Machata --- .../net/forwarding/router_mpath_nh_res.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh index 4b483d24ad00..cd9e346436fc 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6