From patchwork Mon Mar 25 17:29:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782423 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2088.outbound.protection.outlook.com [40.107.244.88]) (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 C362812FF71 for ; Mon, 25 Mar 2024 17:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387950; cv=fail; b=HwmaW18oQi8knAGNNQ1UAgRiqCkxOAQRzBTUj1J7gAAJG4wKq2PWQoPdQmbtkM/hzyQtLBxrZgEpL6Fncm/7MPgOuEvsUjAYMpiBbKbYm7WGTfD6cgjGeA+XZEJtiothK+iUMJ0CEk1LN9+PsWZz3232MxxVsoFIJhMTDTfSOKY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387950; c=relaxed/simple; bh=mTPwOqJNG2Ubgo1VbL8KBG94pbeO7Ct69PxV4ztwl3A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rbDzAfJOiym55HqVCs1lEImIdwV2jc9NuvHCdujfp2TNkT0DAIqCECJ4uEXKaJUkK15gfzGoAPZejyYA+OdtMfxbXmaCuTsWjRCMIFOxHBl3vyRMtYQKGqll4BI86i+rd3EN6w+022BErR2rZtk5nMB2UGVgKUR7cVePL/BEETY= 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=hCs1ch8D; arc=fail smtp.client-ip=40.107.244.88 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="hCs1ch8D" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m7Lxq68ZFXXjVBgVEkSvIVEIOsU/FDtJToOz2GlCRErnDldgfS7NPcFJQyvgZ1zXCp9u2yGd1TH8x9iKvWjW0nQk9XmJkWYLDbP+LkFm/6cwmLTDsAVZls8KwTMCFQ06sbqPR+OeyTXTN/7aV2ovFSFODLvJbnRjcoR3nqiI5mrch6BK3kZSWPpdX1wBxvZ3nSXJgo6g9vmb/wV/+ETpQaHU7gzLmyOQgGpMHsSDtyYDzVzMuQugdoZYZUYsOLcDVeM5ojllQ1UiuOK9LoDZbD35NlZ8iDaEhukCi91ks0d0JFqOyFCz5y6R+OaUUXOCL+sN8yRB1ROAJhApd4jHyg== 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=e2xhSPmedJ8u8jI4x4AuYT4tsV3hpK7epS01tm6pQDc=; b=F+aW75zWwxW0G5GI3jT+fPfaRxhR1gUPvuqrR8+uzWJB/emC7sCK3bzy96N7qzjVtRKi7s+NUh2qtuhC+SDz+RgsCE00chjxZAs5IeLAx9hAnyJ8AUS0owfLfhqzPozEFN67+n/pqMk7QcZrbpcZjDQ+3b/xEO1I2dXGS0bClR2kGCHarZaBX5AaEoJmDLu92DmiSaxQdmE6ltH0FK3SU0ZM0/E3t2YXBkInTMNd3DOUZxxWlljOLJReSKUL5Jl7zfOQp7TqKatf4QVnu7jjwKI0NE/cZWUVmfjoBOsVcliXy+jtGZaUGEvfhiOIo7i+GVbK4+PtUdH/oArTkJ2k4w== 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=e2xhSPmedJ8u8jI4x4AuYT4tsV3hpK7epS01tm6pQDc=; b=hCs1ch8DVt1TnJEam0l6ARlH6ATeFPTskUFt1oRwFt6DPylzTjo6e5iPzWziDwZOiDzMpDxT65UiCn5OO2TZYyoJqmEGA2CDt5ou8Z6xSVnjNnWjGr393Sw+4jUvtjxycjrZ1maUwSfXHQYWrjgNMMrq8d4m5P4MzFdo7kA+30kGJfinc69pX/Q2uh8MPmecl+RlNXRuWGY/aP9g+J4OF07N1DLST2cBlGicDgCmebEs9uPfzEucEn4N5istMtoKBaGZuMN/UAiqGwbYvMC7TI8lUlakZMlYenKymnqGBHBI5pJ4Xu5+swYs/Oil30QRJ5I2sIkGHdTVs2ZG9TOXgQ== Received: from BYAPR21CA0025.namprd21.prod.outlook.com (2603:10b6:a03:114::35) by SA3PR12MB9158.namprd12.prod.outlook.com (2603:10b6:806:380::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Mon, 25 Mar 2024 17:32:26 +0000 Received: from SN1PEPF0002BA4E.namprd03.prod.outlook.com (2603:10b6:a03:114:cafe::e9) by BYAPR21CA0025.outlook.office365.com (2603:10b6:a03:114::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:32:26 +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 SN1PEPF0002BA4E.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:32:25 +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; Mon, 25 Mar 2024 10:32:05 -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; Mon, 25 Mar 2024 10:31:59 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata Subject: [RFC PATCH net-next mlxsw 02/14] selftests: forwarding.config.sample: Move overrides to lib.sh Date: Mon, 25 Mar 2024 18:29:09 +0100 Message-ID: X-Mailer: git-send-email 2.43.2 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: SN1PEPF0002BA4E:EE_|SA3PR12MB9158:EE_ X-MS-Office365-Filtering-Correlation-Id: c5818c46-c698-4f06-a15e-08dc4cf189ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BsEkWBvxwCI72d0jFdoRIZMfgBOwTM7f5Et7c4dU29TppNyJp3Rw7+encGAu11aYvVayvSv4h6DC+RfiTa8z6+FmG3tyhE6lmYPzc/jC3XdzOc8S98TJIhKeK/4h3iaeJJibXWoWrAwqEsxBjKZ9HQl06JP/vkeqouWcDRKQCNr/sUaN1rxeiC3nUBXxddkcCmD23cOOrMalDIyX7XykKIicntarbvoRuWSgtZhSMq/KP0PIFBcG8qdJyqeLZtdNjm/YvCeBGQl3UjlaEp7fJNrSGgLMlvbDUdarFffnrY0wfiuGBR5ZFZg6vThkw4J9Org4RIBsB/2bhvXKI1seZRPnYF6LoCb4pMdWTgOAaKyFj9u41696Dg4t9f7HYehm3pBgnleQFyJwy0MTqn/PBe4M9LI/dsDHJ+IzIH7sYeswFk5j9AqjbZVH66WJRBd8fo5q0bJhtjhW2nNX86ihOhRfVu0EQTvZexUrI2SmD3eFCvM6TMKpCzWibkdNg8Bt6h2Our2Nm8Rdj7NMULG0X7QjWYWdMr68sz6lA4kNya3tCxVYWV5US0xZ9pIU2qDYTq3vlwP0rcBrC8IZUPTt0pLuHVTZ4nvawJL5g7WeMXI7FBKQ90LNsWVs6BjeLQLr+/FxbMSzgfCnY0TlKM0GjsOqDnFABan1U0z4jvzpIDY3Ai4nuJykQI/yQttRqA5ACqPPs1SbGScubVJuIWdAnHAflI+XVzG1Yl9/ob+2bTWRIEtZSf9Ls7xLX6KuQ2kE 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: 25 Mar 2024 17:32:25.9073 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5818c46-c698-4f06-a15e-08dc4cf189ab 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: SN1PEPF0002BA4E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9158 forwarding.config.sample, net/lib.sh and net/forwarding/lib.sh contain definitions and redefinitions of some of the same variables. The overlap between net/forwarding/lib.sh and forwarding.config.sample is especially large. This duplication is a potential source of confusion and problems. It would be overall less error prone if each variable were defined in one place only. In this patch set, that place is the library itself. Therefore move all comments from forwarding.config.sample to net/forwarding/lib.sh. Move over also a definition of TC_FLAG, which was missing from lib.sh entirely. Additionally, add to lib.sh a default definition of the topology variables. The logic behind this is that forgetting to specify forwarding.config was a frequent source of frustration for the selftest users. But really, most of the time the default veth based topology is just fine. We considered just sourcing forwarding.config.sample instead if forwarding.config is not available, but this is a cleaner solution. That means the syntax of the forwarding.config.sample override has to change to an array assignment, so that the whole variable is overwritten, not just individual keys, which could leave the value of some keys unchanged. Do the same in lib.sh for any cut'n'pasters out there. The config file is then given a sort of carte blanche to redefine whatever variables it sees fit from the libraries. This is described in a comment in the file. Only a handful of variables are left behind, to illustrate the customization. The fact that the variables are now missing from forwarding.config.sample, and therefore would miss from forwarding.config derived from that file as well, should not change anything. This is just the sample file. Users that keep their own forwarding.config would retain it as before. The only observable change is introduction of TC_FLAG to lib.sh, because now the filters would not be attempted to install to HW datapath. For veth pairs this does not change anything. For HW deployments, users presumably have forwarding.config with this value overridden. Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier --- .../net/forwarding/forwarding.config.sample | 53 ++++---------- tools/testing/selftests/net/forwarding/lib.sh | 69 ++++++++++++++++--- 2 files changed, 74 insertions(+), 48 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/forwarding.config.sample b/tools/testing/selftests/net/forwarding/forwarding.config.sample index 1fc4f0242fc5..f1ca95e79a65 100644 --- a/tools/testing/selftests/net/forwarding/forwarding.config.sample +++ b/tools/testing/selftests/net/forwarding/forwarding.config.sample @@ -3,51 +3,28 @@ ############################################################################## # Topology description. p1 looped back to p2, p3 to p4 and so on. -declare -A NETIFS -NETIFS[p1]=veth0 -NETIFS[p2]=veth1 -NETIFS[p3]=veth2 -NETIFS[p4]=veth3 -NETIFS[p5]=veth4 -NETIFS[p6]=veth5 -NETIFS[p7]=veth6 -NETIFS[p8]=veth7 -NETIFS[p9]=veth8 -NETIFS[p10]=veth9 +NETIFS=( + [p1]=veth0 + [p2]=veth1 + [p3]=veth2 + [p4]=veth3 + [p5]=veth4 + [p6]=veth5 + [p7]=veth6 + [p8]=veth7 + [p9]=veth8 + [p10]=veth9 +) # Port that does not have a cable connected. NETIF_NO_CABLE=eth8 ############################################################################## -# Defines +# In addition to the topology-related variables, it is also possible to override +# in this file other variables that net/lib.sh, net/forwarding/lib.sh or other +# libraries or selftests use. E.g.: -# IPv4 ping utility name -PING=ping -# IPv6 ping utility name. Some distributions use 'ping' for IPv6. PING6=ping6 -# Packet generator. Some distributions use 'mz'. MZ=mausezahn -# mausezahn delay between transmissions in microseconds. -MZ_DELAY=0 -# Time to wait after interfaces participating in the test are all UP WAIT_TIME=5 -# Whether to pause on failure or not. -PAUSE_ON_FAIL=no -# Whether to pause on cleanup or not. -PAUSE_ON_CLEANUP=no -# Type of network interface to create -NETIF_TYPE=veth -# Whether to create virtual interfaces (veth) or not -NETIF_CREATE=yes -# Timeout (in seconds) before ping exits regardless of how many packets have -# been sent or received -PING_TIMEOUT=5 -# Minimum ageing_time (in centiseconds) supported by hardware -LOW_AGEING_TIME=1000 -# Flag for tc match, supposed to be skip_sw/skip_hw which means do not process -# filter by software/hardware -TC_FLAG=skip_hw -# IPv6 traceroute utility name. -TROUTE6=traceroute6 - diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index ee48c4603ff0..dbd4348f85b8 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1,34 +1,83 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +############################################################################## +# Topology description. p1 looped back to p2, p3 to p4 and so on. + +declare -A NETIFS=( + [p1]=veth0 + [p2]=veth1 + [p3]=veth2 + [p4]=veth3 + [p5]=veth4 + [p6]=veth5 + [p7]=veth6 + [p8]=veth7 + [p9]=veth8 + [p10]=veth9 +) + +# Port that does not have a cable connected. +: "${NETIF_NO_CABLE:=eth8}" + ############################################################################## # Defines -# Can be overridden by the configuration file. +# Networking utilities. : "${PING:=ping}" -: "${PING6:=ping6}" -: "${MZ:=mausezahn}" -: "${MZ_DELAY:=0}" +: "${PING6:=ping6}" # Some distros just use ping. : "${ARPING:=arping}" +: "${TROUTE6:=traceroute6}" + +# Packet generator. +: "${MZ:=mausezahn}" # Some distributions use 'mz'. +: "${MZ_DELAY:=0}" + +# Host configuration tools. : "${TEAMD:=teamd}" +: "${MCD:=smcrouted}" +: "${MC_CLI:=smcroutectl}" + +# Constants for netdevice bring-up: +# Default time in seconds to wait for an interface to come up before giving up +# and bailing out. Used during initial setup. +: "${INTERFACE_TIMEOUT:=600}" +# Like INTERFACE_TIMEOUT, but default for ad-hoc waiting in testing scripts. +: "${WAIT_TIMEOUT:=20}" +# Time to wait after interfaces participating in the test are all UP. : "${WAIT_TIME:=5}" + +# Whether to pause on, respectively, after a failure and before cleanup. : "${PAUSE_ON_FAIL:=no}" : "${PAUSE_ON_CLEANUP:=no}" -: "${NETIF_TYPE:=veth}" + +# Whether to create virtual interfaces, and what netdevice type they should be. : "${NETIF_CREATE:=yes}" -: "${MCD:=smcrouted}" -: "${MC_CLI:=smcroutectl}" +: "${NETIF_TYPE:=veth}" + +# Constants for ping tests: +# How many packets should be sent. : "${PING_COUNT:=10}" +# Timeout (in seconds) before ping exits regardless of how many packets have +# been sent or received : "${PING_TIMEOUT:=5}" -: "${WAIT_TIMEOUT:=20}" -: "${INTERFACE_TIMEOUT:=600}" + +# Minimum ageing_time (in centiseconds) supported by hardware : "${LOW_AGEING_TIME:=1000}" + +# Whether to check for availability of certain tools. : "${REQUIRE_JQ:=yes}" : "${REQUIRE_MZ:=yes}" : "${REQUIRE_MTOOLS:=no}" + +# Whether to override MAC addresses on interfaces participating in the test. : "${STABLE_MAC_ADDRS:=no}" + +# Flags for tcpdump : "${TCPDUMP_EXTRA_FLAGS:=}" -: "${TROUTE6:=traceroute6}" + +# Flags for TC filters. +: "${TC_FLAG:=skip_hw}" net_forwarding_dir=$(dirname "$(readlink -e "${BASH_SOURCE[0]}")") From patchwork Mon Mar 25 17:29:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782422 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2068.outbound.protection.outlook.com [40.107.96.68]) (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 7C93E12FF93 for ; Mon, 25 Mar 2024 17:32:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.96.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387966; cv=fail; b=Bov+kBVLI2moaHYLOBXS+FlYVS3D8SCFEnHJ6v6+If/yIlqD0e517yxmiuWRDDsaWJmLcG3XslwTvlVY3DTEdYEbovJCsR9Atmgyg8nzd+9zeZt/90upu5ILZOQ2fYGpVMcBDEOkd7LeMvqXvlUaW8JCCe1AerYJFhsHSGCze4E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387966; c=relaxed/simple; bh=U6IDXaxfmqSNGryMzeBJlZXsnDiUp5VBG59deIGI2Mg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n4Szt92SfmJ+KVkiboguRQogjRzv0nB8GLelt2Z9wwRDBCqHHYGWsKMXEy/D+4JI80/hsajiq2jBDKTDWXhUnDvcndBQrfXP/Z1vQL262Y2m9XQhlUNaRnEirNyRTmOBtooHUiVtd/yRQJGmbKRck6AaDDSS3kkcK5irheFYZLM= 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=smwZbz/T; arc=fail smtp.client-ip=40.107.96.68 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="smwZbz/T" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0TY8jS1a0pWi0DUofe0zOFY0EsR0OxVmbqlyP/MfwfVlgWCNRfvmxG1aQZnEO0Vyieexl+2BhU4SXhAiRExyZPJGfYqullQUUBunOqzfHrCcNfbzxUQOAXdniLK1pctT85Q8tWALed+KeeRrdPNqVj4bc99639HwF+exbdoFPHjqCQ2Out//ii4XsIR9XWWEPeA0Z+gGrPA2yt7VwRk9LEGenSNNMMZqDvXu7Ac2EwyrKp0EElatt88J+fcihMclnccZHzWCB2Z60MZA3dx8muIEbpCo8efnarg/OU9UWkP5MBAwLy++dJ6euekr53DpXkDp7AxCh+1aNj6wsufBg== 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=eZbHvSGkaPZIc+jXFrBUJrlxuSi9YeZoD9csuGvfi0w=; b=YLgZhNOyruojhqQmqgcejVxxWWoVazssxRTT/yLO1WWVqJYOkuo5GHcyKiO7KjnM4McmksxFqydcHZAoUG/pJxUKWbBjOO51eeQ5ozDJ7CyB+bw5J08rM7xio/ZCnn/wUwiJkS0mu9K9HxO0ZsvAgHzBe7j4+K37rnonWsJI7RMteQhEYcaT4r36B4OVBeJ9gD4lcFOOoA++bWN+xkdh0Qo3fb+j9HSFRVjnh13iW5sCIxubtGAt+Kp1eboRi3l6lWqUcjTVB2Dlwg+oIaGKR2Ot3EPJsvwd3sotR9OUJncZZ48OLE9b4s0/IZOfYTspdjOuCyZovqNzj0sxRMe5Cg== 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=eZbHvSGkaPZIc+jXFrBUJrlxuSi9YeZoD9csuGvfi0w=; b=smwZbz/TX+eRbgCxJvRcldXxJKH+Vp0MlZ4ZHOuM579EBxl6q3GSAiCsDcGrKtukudAtyAh7Aa7CaY3gUylWtSRdvmR7ZkoClWX9F5Cy9hxt3Q4otK/ooUB077tVNgYcPMuLPd4/GV7fRgHlSqdheJlzAZOAFigE4mrj4JoUvf7MGPjAYZcGfNrrV5EenWnTgh8BXvBQhw/nL9j+f+RBEV9F3aiPQCqy1hWTOBkZ/sOYsmVY35CnXBRPhOwCAfzGzc9x7aUPbojS9RE5VF2p/GbfaHxmDVyOdqmCO88RPqxv5oFJ/Z9SEveulha7QrRuDCKDb3RuXlNA7OWswez+ig== Received: from SN6PR08CA0007.namprd08.prod.outlook.com (2603:10b6:805:66::20) by BL1PR12MB5971.namprd12.prod.outlook.com (2603:10b6:208:39a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 17:32:41 +0000 Received: from SN1PEPF0002BA4C.namprd03.prod.outlook.com (2603:10b6:805:66:cafe::ba) by SN6PR08CA0007.outlook.office365.com (2603:10b6:805:66::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Mon, 25 Mar 2024 17:32:40 +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 SN1PEPF0002BA4C.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:32:40 +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; Mon, 25 Mar 2024 10:32:17 -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; Mon, 25 Mar 2024 10:32:11 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata Subject: [RFC PATCH net-next mlxsw 04/14] selftests: forwarding: ipip_lib: Do not import lib.sh Date: Mon, 25 Mar 2024 18:29:11 +0100 Message-ID: X-Mailer: git-send-email 2.43.2 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: SN1PEPF0002BA4C:EE_|BL1PR12MB5971:EE_ X-MS-Office365-Filtering-Correlation-Id: 37cf1f06-25a2-4557-6f3f-08dc4cf1925c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K979Qq2RhHot5+DvzrVwF1+s0ZO2DaFBenswHmh0POaPhDlaRo+CwEFyKt1gS0VTYWoJZwTaImdkNotmakn1caJrUlWf6iIG8NVV79YhRZCsBMIrxUGpd+0EqctScNoZNV5ehSs1VhgE2YU/xiDmJtk6OMu/Ix8aNRQ/iuNMG8Zj75KSlwevucRrcHiiNHAcmewdyryZ30/gyyoFVpHmZnQM9VXpIb6c9/l7nGK9fvsbeHcS6aB13mkvR25ZpZqmcToJ0L7isXEn/PWhdcnsKOsPrGImiexVXQylGMwv9Kja0DP6ZbLhmR1rrMJUvZnG/LTvpGz49qAV91VpNbtdF2CQd/zx5/Wy4/hqPQR0lbGI+oEXcg1VXCevK/BQfe0F3TBKHznzqXUGI/U+g3bvn5TIcDhK1PwmoY2ZZRArYaPSzxZh/0lOktsmEs6EW05Kbq0YCYIAZygB2d6MYvHN2JJ9NzkgTJ1tyXpGe26VPA10A9LBAGt/nd2ZNPHhx7CCZoRBAPGK2uJPxLnDSAhAj2CPa4ipBPRSRswXW8BzFqyDDw4SGgCjpS/SjR+bCwjmesAZcSqx1Q3ELR179xaLF42uIssWU8IQwRYdxHNW7WkUB0xGEzLkFH0JkWdhy+z8onyS8rqvelDBsrXGRJd2mqPYQvgGZGonTszin16jRo0bYxhAMcZANaaBEsXWlT0JCpwwgesKQ9PpsX7Q2hP+GQh/oleYTYFcumL9LuYc98W7bu9yWl8o1fXRNhkW3c94 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)(1800799015)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 17:32:40.4722 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37cf1f06-25a2-4557-6f3f-08dc4cf1925c 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: SN1PEPF0002BA4C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5971 This library is always sourced in the context where lib.sh has already been sourced as well. Therefore drop the explicit sourcing and expect the client to already have done it. This will simplify moving some of the clients to a different directory. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/ipip_lib.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/ipip_lib.sh b/tools/testing/selftests/net/forwarding/ipip_lib.sh index 30f36a57bae6..01e62c4ac94d 100644 --- a/tools/testing/selftests/net/forwarding/ipip_lib.sh +++ b/tools/testing/selftests/net/forwarding/ipip_lib.sh @@ -141,7 +141,6 @@ # | $h2 + | # | 192.0.2.18/28 | # +---------------------------+ -source lib.sh h1_create() { From patchwork Mon Mar 25 17:29:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782421 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2045.outbound.protection.outlook.com [40.107.223.45]) (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 70944131BD8 for ; Mon, 25 Mar 2024 17:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387969; cv=fail; b=mNYdIRvB2kSx2q8cwLQOdHc4YSsLK2Idz46/JVuW/aF/CNfxzfJDxhN8CtC9MVaETVnljVxVI1Olxa8NXaawHcC2ar59PBMfoPKmPu9XA7dpuY/ZpIuLt/+AVliBdBF24k96xzNCY9Akg3gatIzBm0Gc0cI0+07EXl5aGYVjf2A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387969; c=relaxed/simple; bh=AZUSMPjiXcvxzVlj7PylF6NCcBvM5lAT79psV9iJqgU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=vE+6T3wdp6udUpL6iR5UQsnIjHR1cUbUxgu3FIPYKcxvcGEgycqEzx/888pYjkfBAf4NcxoI54pVFT5+JuzYZP+MvMUPdPpzMq+XbhJwlamT/6atlZhcWlAdjLAB5H4gSllMZLFPc1ckJtd5fE/ymouvL0jLRQEsK5n/KzTj7sw= 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=JZxPNFdv; arc=fail smtp.client-ip=40.107.223.45 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="JZxPNFdv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GHhtdx7wJWhswCP5nWpJdpeNNKe8UQIeuu0Yd/L7PZrY/lWQrQslM7qp0zKxPEwXYGzVpeie+W6UG5SOJdVuyYRtj5thbGhjPMrMBEaUocQKDg2qMo1bJiNDoSfg4z0nHI//XRWHOI3bvvwqHjS0DHkBfXx0Fds0vuv5UxK2mNlimtOA/K8oHESEJzJ/dzqB40KeOXItIc+fLpO20M8wTXv9erRcl6E8gFNyxjFAGWsGBpkJMKBcS7BHO/i3i0y384tRL9DNBw+HUnQLTKaw42STlNf8RMRhnraGPs2lgPN9onstEoWmIsEAyAFlIrNp3aeDAEQr7JR7XAz8kieqZw== 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=9mCdfpmuRZSleSTsXITlCnaK2+7xoOs+UANN5D6l938=; b=fGNsnof0koRUaSnONvC94iYeNdIcCpBcTF23TaPKavFHeiU0Sfqx6z85gWpekuATFYbqcdtHEcnd1YY9WMfXFkisbu3LIJ49QjMXn6Nb69Np/MnmNk7R3HoQgzueyBT45KC6ZVSecHCd1qObt967kjuICXDs/4Coo8i6dhBtgdK1trZih9q9Qpol5rBCtCpk+XL0GkktkynRItSBvk+WIgWGujPB8NA0wW8PKIQop0B3XhrgoOg+yO4KtGlSByE1k3hVipuN1JuzZOUk2rkXfDvtF41CLIaW6dvb9dNAn2et372gztJ7A/6qBRW/DS3SdGU9Flf77wgN5uDPKw2qmg== 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=9mCdfpmuRZSleSTsXITlCnaK2+7xoOs+UANN5D6l938=; b=JZxPNFdvOKkBVCqEE5houq+wif/LYxwUMJ/Aeg7wF2GYSnh/Jz3kaf5y5mJODFvYcPspPz1KkUuVIamP5GkMssVWby+1TT9jRBe3tAiTMj49GXEot4t+eA71JmfMCCcybeOjtfyq0TU+62bm+bbgxz7kn42ILLhgKDYFasdj1JyfxqYMh03e4W9sqXozCXkoAfQhJNmBNUpGttLJWt/6AnMqpgfL8C2zLHOrdFcKvLB52ivmMEmaAbXtaBAcVpGh8ISS/+KQ3MvWlqMt/6ErlKiebbV3N8PyR6fHX3KMx5kwXuyb0d3ECXvYVOpIoo/Ektx0qljL8Uk3+Y5Bc5uWcA== Received: from BYAPR05CA0036.namprd05.prod.outlook.com (2603:10b6:a03:c0::49) by PH7PR12MB8777.namprd12.prod.outlook.com (2603:10b6:510:26b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.26; Mon, 25 Mar 2024 17:32:43 +0000 Received: from SJ5PEPF000001CD.namprd05.prod.outlook.com (2603:10b6:a03:c0:cafe::7f) by BYAPR05CA0036.outlook.office365.com (2603:10b6:a03:c0::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.12 via Frontend Transport; Mon, 25 Mar 2024 17:32:43 +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 SJ5PEPF000001CD.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:32:43 +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; Mon, 25 Mar 2024 10:32:31 -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; Mon, 25 Mar 2024 10:32:24 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata , "Danielle Ratson" Subject: [RFC PATCH net-next mlxsw 06/14] selftests: forwarding: Ditch skip_on_veth() Date: Mon, 25 Mar 2024 18:29:13 +0100 Message-ID: <63b470e10d65270571ee7de709b31672ce314872.1711385795.git.petrm@nvidia.com> X-Mailer: git-send-email 2.43.2 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: SJ5PEPF000001CD:EE_|PH7PR12MB8777:EE_ X-MS-Office365-Filtering-Correlation-Id: 257da132-da58-4607-7fec-08dc4cf193ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WRhJgxAwqT4dq5fAAlg5QPko9RHKOPRm4IUZbZIqW0M+3FRTG+kLRSbp51rPn8HhqkXDbW4d4LMHnNwXvC7AA9Tri1B8PMJ+amxDwQWwUpDHw5aNMgXEmFAB4fqawMXDwf7K9tZFAUluk6ygziE1Af15JOooEDQZTyXTprqZUDWKKzdwf/Yd/AOPaioLhMNNRIH4jFx50Ku85gEnTZc/z5nzT+ZY3f4/L/Z7018Cks7DtUpN1T2aILm6Vb/wb+ol9BiaWwxv08Cxvx3x57QOLZIRJPG9lWa8oJGFPoTdiXpY/o9HyI6auuYkuMgruP0J0x0Tj1tAOakf0ohjvMrhIPQ6Dt+dRvxlimTp4qOmBozLdjahpfLXoxTps/VXUOk0JlIiAWiZma1X2WO6O8tMtray0+oQfR4qldNMIK1QF1/w6q/uBzw7kVc0GDRpqWg8R2JHfbA+sYNxFP9j5LBG8l8j/+7cxy+z9PwbVsJkwEceKqHln6yRzrcltXAxsKUcAI5KvUx/Hy5n/HoniCbLmxDyr1Rw7RHtLpFsZM2WAusm1zUUBawo7vD0jWKzelwAFihyKxCndd+nztAtlMkKKbf2uBJWiY9IzajEiftBspJVtM+Srx7zmntkDm40UcM1rwwFkiB/TaRgzn7ZUMXl+AZIBhBsK7h7wqWm1qqMleGiVQT1vHSA1tKmvAMy+3PLLUf0spf2DueRTG/TLXWLsdc1BHTko3gdzB+atZErsnLTC/vciK/uIvCNZB0omfF7 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)(1800799015)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 17:32:43.1878 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 257da132-da58-4607-7fec-08dc4cf193ec 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: SJ5PEPF000001CD.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8777 Since the selftests that are not supposed to run on veth pairs are now in their own dedicated directory, the skip_on_veth logic can go away. Drop it from the selftests, and from lib.sh. Cc: Danielle Ratson Signed-off-by: Petr Machata --- .../testing/selftests/drivers/net/hw/ethtool.sh | 2 -- .../drivers/net/hw/ethtool_extended_state.sh | 2 -- .../selftests/drivers/net/hw/hw_stats_l3.sh | 16 ++++------------ .../selftests/drivers/net/hw/hw_stats_l3_gre.sh | 2 -- tools/testing/selftests/net/forwarding/lib.sh | 11 ----------- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh index 187429670ee7..bb12d5d70949 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh @@ -287,8 +287,6 @@ different_speeds_autoneg_on() ethtool -s $h1 autoneg on } -skip_on_veth - trap cleanup EXIT setup_prepare diff --git a/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh b/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh index b0f931260a27..a7584448416e 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh @@ -109,8 +109,6 @@ no_cable() ip link set dev $swp3 down } -skip_on_veth - setup_prepare tests_run diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh index 744760117005..7dfc50366c99 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh @@ -325,17 +325,9 @@ setup_wait used=$(ip -j stats show dev $rp1.200 group offload subgroup hw_stats_info | jq '.[].info.l3_stats.used') -kind=$(ip -j -d link show dev $rp1 | - jq -r '.[].linkinfo.info_kind') -if [[ $used != true ]]; then - if [[ $kind == veth ]]; then - log_test_skip "l3_stats not offloaded on veth interface" - EXIT_STATUS=$ksft_skip - else - RET=1 log_test "l3_stats not offloaded" - fi -else - tests_run -fi +[[ $used = true ]] +check_err $? "hw_stats_info.used=$used" +log_test "l3_stats offloaded" +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh index 354be353455f..ab8d04855af5 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh @@ -100,8 +100,6 @@ test_stats_rx() test_stats g2a rx } -skip_on_veth - trap cleanup EXIT setup_prepare diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index dbd4348f85b8..ca433ba3612e 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -254,17 +254,6 @@ check_port_mab_support() fi } -skip_on_veth() -{ - local kind=$(ip -j -d link show dev ${NETIFS[p1]} | - jq -r '.[].linkinfo.info_kind') - - if [[ $kind == veth ]]; then - echo "SKIP: Test cannot be run with veth pairs" - exit $ksft_skip - fi -} - if [[ "$(id -u)" -ne 0 ]]; then echo "SKIP: need root privileges" exit $ksft_skip From patchwork Mon Mar 25 17:29:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782420 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2040.outbound.protection.outlook.com [40.107.102.40]) (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 CE2D4131BD8 for ; Mon, 25 Mar 2024 17:33:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387992; cv=fail; b=d9e0WWwK6imIFRDfPqUPGoVmsXCD7+LyPkZPFNnu/ASqyApcL+rAw0d0b9snyD1ktU1C0YNaAivnYKhDjrnZ4kGBmd77bGepipoaW3aBJRnhrHiTltgcovkzQtkAeEMFvWGb29k8RDE1DL7LUWXWB04sG9CvSr/IQiW2gTBC46A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387992; c=relaxed/simple; bh=HDf28ffDoLt2OzHE5NC0EZDQjL9LK9TeToUEyEt1fpg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PJvIDGVTGAAeJdeIA0vaJui/bsmtnoq1vMRVUOJds19jgwN6iKzSvghlGvnpk0+rMMcGD/l3BhN7y3LE3eqwhh9LWS7JYXrH3dNors2RFjFXRlDV0DoHq5Zltrqjt+N+KBXU9pGsIY7qe8aNsKb3mLlfKQRP8+5RYhiu8dGXZ/s= 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=pojy8MmW; arc=fail smtp.client-ip=40.107.102.40 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="pojy8MmW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VvqF0DIk0Cq59XTE361sNDfxukPQ+B2WGJ3EXJmgCIluRzEkKHhND/csTTuaphlBTGqrtwe4cUm+ug24pyfisp846rcDWw8CBsiHuMBWOyqbtickuVpVe8nCfCnIyCLfE7smkanutiDU3I2kDtDrns20rElbyCd1pc8Dm4kmvX/PlAXMG4Y2W/8r3u92Jbfqw11zmxAwW6BXF1GOsXIieyEADVVDkdozg46aXBNKceYMmJ9VPkHUyMGqs61KwmeOd2reGMi6+Djq648Wl9IxwLo6mEBGx0S7G85BiOSlfUYsrWwx+E09NIiOquUavrFNe8KFdVkQrSI40NkyWXLxEQ== 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=vmFb6laAYMesL6/V0w2y95pwC3ay+pBzgWlmAeKdWro=; b=Mdx2r9XdodD+fC0UK7XwhwP3Dzb7DLw0LAJFs/fN5p9B7gHLhYQ/jJGIRAtFohg7dzljAaQQrArLOVqOEuCoQ7g700uh4RmFMfYAguK36w1OWLl4vElhjXdFEBdZ+bBPTCTI+y5aKksYUy0bxURhTMp8yqmQcxVdxW4IWEZtvZUcmOHQhcgJS2ZLskQXchmOlOTJW9LrA+jlAWTu4pc/sFjO+lsxBJzIxXnSOJKtFdzASQb5ogyrHdPMBgNzGH2CJJyZbwr4366h0lErhxIt8jHyuLpkoe3sfakRSAbNsenyfDhhQkFaclPrTaOENMeM64J5qM/X0+8J1uMbhyVNUw== 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=vmFb6laAYMesL6/V0w2y95pwC3ay+pBzgWlmAeKdWro=; b=pojy8MmWF8eopH6QlCuuzL0WciVzB+AY+jSPalc8ZDBkXYO4R5IEb+BRfwexLd3LDE9jtFg7bD3wbdMN064eFtf27qye2w7USsFTJTk/3kNfZMbWMoXk8BL+vhLV9WD6BJ+rjswG1bNfi7BZ1u6AN0omdsQLIQOGNtvT/l99XYftG2GnQWjrLPEQks+HEfvPMtoggE1N1gn1iw/edmu9W7RM6EEuK9Jp/mUuFaJTUgeaJU0P67BNccW0k5y6J9OiIar1v9J64jfKxr9Gy8BCaSgrcsd7Mj7Is0jwvxC5Dd0n8ipxwVcFa+Y8vUvWqFQIRclpxsze9+OYJpgYXijTQw== Received: from PH8PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:2cf::25) by SA1PR12MB6751.namprd12.prod.outlook.com (2603:10b6:806:258::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 17:33:07 +0000 Received: from SN1PEPF0002BA4B.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::6d) by PH8PR07CA0027.outlook.office365.com (2603:10b6:510:2cf::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Mon, 25 Mar 2024 17:33:07 +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 SN1PEPF0002BA4B.mail.protection.outlook.com (10.167.242.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:33:06 +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; Mon, 25 Mar 2024 10:32:42 -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; Mon, 25 Mar 2024 10:32:36 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata , "Davide Caratti" Subject: [RFC PATCH net-next mlxsw 08/14] selftests: lib: Define more kselftest exit codes Date: Mon, 25 Mar 2024 18:29:15 +0100 Message-ID: <545a03046c7aca0628a51a389a9b81949ab288ce.1711385796.git.petrm@nvidia.com> X-Mailer: git-send-email 2.43.2 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: SN1PEPF0002BA4B:EE_|SA1PR12MB6751:EE_ X-MS-Office365-Filtering-Correlation-Id: cd7012dd-b4f8-4929-e29e-08dc4cf1a200 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /z9iExj3YSVLEu8Xz6gHdwDO9CNIo5znoiLUfXlvG/cWREPgqj6+qqg9ZYjel9zMFTp7lwM7FFhP6I17PTD5maJTICfuCyMz0bJu4Lkm4fpfHOadHrr0X70oz8TlMMe+j0niXHFFQ1SIdal1EDISlN4z9IHwflgj9hli4JvOfsx86o7RQt7VH96XvLjst+QleasgH4BNlSqF/sl7GDlcM+mJSZ0RurEsFfE+pA3bRM1WHsoC0yKNOzgzPU8fTEuUiN5EYBcRfhWqQi6azwBhY5g+dfQYIuaeyV0wc8GF4BfF1V3P9JnNp0/24AcBv4QxGdFOQi9P5sD8WeTtbxDe8Zfwu1ffpJZtrNSgT6AB8wpGeGW2lt/72Vyc9jr05Cqrldod8G7P7OmkwJZ2bG/DrjrpCfGB+dWKVqEtF0Tqy8xiC86D/s4WcYKaHLTgyLBiOEyUkXe5QnHuivwmpjNcrDNyKSGB0mBYmvj9vk5iXShGIIKqcftRkEF5poKTDoYFnujtqJbRVt/Fp2kDzF3pS/VkHy5XaaXblE/IYVUqaWtYGR7md6gRuPYVicAcY9kklumMThBFLRlLFGFpcY8VqLRWyMGl7fYyTXrzVyQc10oPHN/pIiHV0sXb5r/kUKqNnNLY2c2kfmMMVnqlKyAeF94NJ2dx63qMepuXVdRr8W3WZb6kWwORUEV9lvPA/DpLu/htMsMqebdUfzJ9d9iiChqEgfAeYYHtvGtskEVaoJ9aEE6sg4ox/rOfAhJ2IqAp 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)(7416005)(376005)(82310400014)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 17:33:06.7157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd7012dd-b4f8-4929-e29e-08dc4cf1a200 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: SN1PEPF0002BA4B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6751 The following patches will operate with more exit codes besides ksft_skip. Add them here. Additionally, move a duplicated skip exit code definition from forwarding/tc_tunnel_key.sh. Keep a similar duplicate in forwarding/devlink_lib.sh, because even though lib.sh will have been sourced in all cases where devlink_lib is, the inclusion is not visible in the file itself, and relying on it would be confusing. Cc: Davide Caratti Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/tc_tunnel_key.sh | 2 -- tools/testing/selftests/net/lib.sh | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh index 5a5dd9034819..79775b10b99f 100755 --- a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh +++ b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh @@ -1,7 +1,5 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 -# Kselftest framework requirement - SKIP code is 4. -ksft_skip=4 ALL_TESTS="tunnel_key_nofrag_test" diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index 5b366cc4fc43..d9bdf6aa3bf1 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -8,8 +8,12 @@ BUSYWAIT_TIMEOUT=$((WAIT_TIMEOUT * 1000)) # ms -# Kselftest framework requirement - SKIP code is 4. +# Kselftest framework constants. +ksft_pass=0 +ksft_fail=1 +ksft_xfail=2 ksft_skip=4 + # namespace list created by setup_ns NS_LIST="" From patchwork Mon Mar 25 17:29:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782419 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2076.outbound.protection.outlook.com [40.107.95.76]) (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 3225412C545 for ; Mon, 25 Mar 2024 17:33:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387996; cv=fail; b=nbx8QxgU+hpn6lDnWj0Y5EKZU6nUwbhg8quaT+Q4Xa4DVUJPKlKF0VGST/pg6Jk09jnF0Te7V2R44uwiHqpCiDhqeqrXbkizsjbkohFn/eSTOsp4O90rzwqET9JKH9C9/oTMVOR6My5TJgCKM3aq4X/bZ59PwGskow2Cv8Ywa9g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711387996; c=relaxed/simple; bh=Z2UsHHfIZ1dfSYQOicILd9VGYKjI68UbAs5c2qIZLP8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q2opLdItDkwwxf/StIBdFI8wZS2mZvUvGaME5+F7I66dA5PcbckG3ua4CdNnjUEgwJ7GbUxrHC9zlhpD0uZozNa0InVMCNHtTnTOBbAm0+gV9Sk/VAt/kRhbcQWP4JamxLZ/Lt+mloXqQS3mZCfEnbmEMS3DVB7A5HcKrDxUJvY= 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=fI45JxAE; arc=fail smtp.client-ip=40.107.95.76 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="fI45JxAE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7lPHU6PdGFEaareJoC+v3ZsHM2NYvHBop8nYf3+xNnwK9F3ICjOWr7m6XDARNHrQfT1ULCBMhx6gGU2K12mnIUMGrOdCkDoEdN+PcRknKsYpWXo4mVVS9/k9Nd0p/2Q8iowgDadAGz8U0lwlr5WUd2iIf0RAj+1Xy2IU9A2n1A4oK02XYSAUtcs5Wcln482mIgRFOIs122XbkjXmnhG9Nj1cpuwiq5+7XtVVM6UmNEp2eB2zwBX4TGGjeLs2etLz0rHfnE77E21pYySlKYzHaKI/HUhS57i38h+DinyCHSQjv8pQA+qweST+JFxlVc/SlPq0q7fZzQy9wwvHcJZ1A== 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=WaubpYhMibDQ6SdKpL9fTZ9ADyHIA00Zw3380a5t9+c=; b=GQsYGonDIdgzm/d4l8ssIzqFWdcEYxE0TLq16M7EmkAYG8Ppy3JQXklC9tHBhHdm0v7idH4SJVPY42tTP1lZl7gt6B9250rx7R3DXTns/O1+IE50jRjECUfK98YEyMIUc863HIiqlfUv5lrZfDXCFc4cVozdXdpJg5SNANOie1IcdVG2IARE50zO2wdCj5Lio8d39r2cJHNb1DOy7Xelfb+nZTFGP1Z1S5LoS3YUVdNW+IboweQo6KR5OSETBPx64zIbpLIBNVazZ2zn4iZSZkkFsVuMgIkctvEqjBjCu84yuM/z47jt8yDHkmmGNBbJKeFt9hNIAz3Tqi1zRnfwrw== 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=WaubpYhMibDQ6SdKpL9fTZ9ADyHIA00Zw3380a5t9+c=; b=fI45JxAEX8pNfLBUHzUjJqPbOwJyW0otow5USJ96ofLKbu9EHufbwDyiV1AZyncgzHzwnnrbt/BpFfJzKnLsB9pdsGEF1AdHknLiCT1qZgJkeLIcUBHqkvEAKAzPu2l0bJsYxRXTatZemM+jtmkoOVv6wUi9jYqNIwT95NdzpvZfzOgbtXDY82T298ZXbmBc3pCz+ZeJexue4TZ7e2ZKFZbdkTzTj10Clz9qnuZGgZQBgT4cy52GXTOuw7/d/EBQIl3jwlFb3UYk0gqrfE6eQK4tcPxsbHBgM73x7Q58BhJKGsU7gWw+9i/Oc3W2HTrNlJTIowQPSWs8GI060+dbMA== Received: from SJ0PR13CA0030.namprd13.prod.outlook.com (2603:10b6:a03:2c0::35) by CH3PR12MB8354.namprd12.prod.outlook.com (2603:10b6:610:12f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 17:33:12 +0000 Received: from SJ5PEPF000001CC.namprd05.prod.outlook.com (2603:10b6:a03:2c0:cafe::10) by SJ0PR13CA0030.outlook.office365.com (2603:10b6:a03:2c0::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.11 via Frontend Transport; Mon, 25 Mar 2024 17:33:11 +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 SJ5PEPF000001CC.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:33:11 +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; Mon, 25 Mar 2024 10:32:53 -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; Mon, 25 Mar 2024 10:32:48 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata Subject: [RFC PATCH net-next mlxsw 10/14] selftests: forwarding: Convert log_test() to recognize RET values Date: Mon, 25 Mar 2024 18:29:17 +0100 Message-ID: X-Mailer: git-send-email 2.43.2 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: SJ5PEPF000001CC:EE_|CH3PR12MB8354:EE_ X-MS-Office365-Filtering-Correlation-Id: cc7e2494-04d8-4f76-59f3-08dc4cf1a4b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +9CWir7KpHTg2HBCbpz0N3VyaN+gSTZXaPkqJqtUxRhDC+5YJjZKiqcbI1/RGlm8AC3qLO1dZRVSPMfv5KUiTKleFe5WLXICTJjCp5nTQ6dqKJZED78pEss+sG2wZnHZ73yQFSnfSRTaEGET/Mb3WYpMCn5cRWBaS9QSynasMF9L97j2B8Dzfmdcy0Qtrigr6E0xC6lO0MTRfzmhvt/TUYKiiiDYptFLeuQAYjCtOxoeAw74wt6lFZA+7kBeR7O7/pD2/BQFz6Rfh5WfxcB65RK4W5ljdZM80XLovGYlHfw5dS22aXy/knWa1G3lgNnG5sGhHtA6qroRPxhz2vXMokqdSOMGuXMyUml1m1Hlw/eDN1gF2pbEoxCeex7rR4h0AP9+DuVs0s48Hx6l+Fo4yVgboM5ol+7dP9kad4GKDlVks0IptYunAgL7HYi1cbCcSXlySYIaVbfP/A2G7U1I5lePD4zCsA6A3+6Ep1fuOrTJFmgRDNUaHx+CH509bsOK8rvy3L9JJln75gkHMLp63EW/6289pAqxeNGMAMerE/HSTE5UfSA6Zcd5KxELY8IIIjzH9dRpsGO5OuiMkMbw4fJkIjFYgnXb89JBc+uKI+FW8mFe6NV/T4i66mGPD+3TiFutyaN1vi48FIqL0WduwAksT4tqQjuhwiWE9kuPWlvIsKKwMCohqyILUq1i08iJhE4TyVkHCC47pEcrpKmEL2uN32yf2/Fcjw0mxnJWqDeePuGX4CMMQiiDgfePVDJf 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: 25 Mar 2024 17:33:11.3476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc7e2494-04d8-4f76-59f3-08dc4cf1a4b5 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: SJ5PEPF000001CC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8354 In a previous patch, the interpretation of RET value was changed to mean the kselftest framework constant with the test outcome: $ksft_pass, $ksft_xfail, etc. Update log_test() to recognize the various possible RET values. Then have EXIT_STATUS track the RET value of the current test. This differs subtly from the way RET tracks the value: while for RET we want to recognize XFAIL as a separate status, for purposes of exit code, we want to to conflate XFAIL and PASS, because they both communicate non-failure. Thus add a new helper, ksft_exit_status_merge(). With this log_test_skip() and log_test_xfail() can be reexpressed as thin wrappers around log_test. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 92 ++++++++++++++----- tools/testing/selftests/net/lib.sh | 9 ++ 2 files changed, 77 insertions(+), 24 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index e72b2370238c..942f38988941 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -438,6 +438,62 @@ check_err_fail() fi } +log_test_result() +{ + local test_name=$1; shift + local opt_str=$1; shift + local result=$1; shift + local retmsg=$1; shift + + printf "TEST: %-60s [%s]\n" "$test_name $opt_str" "$result" + if [[ $retmsg ]]; then + printf "\t%s\n" "$retmsg" + fi +} + +pause_on_fail() +{ + if [[ $PAUSE_ON_FAIL == yes ]]; then + echo "Hit enter to continue, 'q' to quit" + read a + [[ $a == q ]] && exit 1 + fi +} + +handle_test_result_pass() +{ + local test_name=$1; shift + local opt_str=$1; shift + + log_test_result "$test_name" "$opt_str" " OK " +} + +handle_test_result_fail() +{ + local test_name=$1; shift + local opt_str=$1; shift + + log_test_result "$test_name" "$opt_str" FAIL "$retmsg" + pause_on_fail +} + +handle_test_result_xfail() +{ + local test_name=$1; shift + local opt_str=$1; shift + + log_test_result "$test_name" "$opt_str" XFAIL "$retmsg" + pause_on_fail +} + +handle_test_result_skip() +{ + local test_name=$1; shift + local opt_str=$1; shift + + log_test_result "$test_name" "$opt_str" SKIP "$retmsg" +} + log_test() { local test_name=$1 @@ -447,40 +503,28 @@ log_test() opt_str="($opt_str)" fi - if [[ $RET -ne 0 ]]; then - EXIT_STATUS=1 - printf "TEST: %-60s [FAIL]\n" "$test_name $opt_str" - if [[ ! -z "$retmsg" ]]; then - printf "\t%s\n" "$retmsg" - fi - if [ "${PAUSE_ON_FAIL}" = "yes" ]; then - echo "Hit enter to continue, 'q' to quit" - read a - [ "$a" = "q" ] && exit 1 - fi - return 1 + if ((RET == ksft_pass)); then + handle_test_result_pass "$test_name" "$opt_str" + elif ((RET == ksft_xfail)); then + handle_test_result_xfail "$test_name" "$opt_str" + elif ((RET == ksft_skip)); then + handle_test_result_skip "$test_name" "$opt_str" + else + handle_test_result_fail "$test_name" "$opt_str" fi - printf "TEST: %-60s [ OK ]\n" "$test_name $opt_str" - return 0 + EXIT_STATUS=$(ksft_exit_status_merge $EXIT_STATUS $RET) + return $RET } log_test_skip() { - local test_name=$1 - local opt_str=$2 - - printf "TEST: %-60s [SKIP]\n" "$test_name $opt_str" - return 0 + RET=$ksft_skip retmsg= log_test "$@" } log_test_xfail() { - local test_name=$1 - local opt_str=$2 - - printf "TEST: %-60s [XFAIL]\n" "$test_name $opt_str" - return 0 + RET=$ksft_xfail retmsg= log_test "$@" } log_info() diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index 88f6133ca319..b7f7b8695165 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -49,6 +49,15 @@ ksft_status_merge() $ksft_pass $ksft_xfail $ksft_skip $ksft_fail } +ksft_exit_status_merge() +{ + local a=$1; shift + local b=$1; shift + + __ksft_status_merge "$a" "$b" \ + $ksft_xfail $ksft_pass $ksft_skip $ksft_fail +} + busywait() { local timeout=$1; shift From patchwork Mon Mar 25 17:29:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782418 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2064.outbound.protection.outlook.com [40.107.94.64]) (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 3D45D130ADF for ; Mon, 25 Mar 2024 17:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711388011; cv=fail; b=UCNeBbVk+fvwDSGFJbPYBKY/lTgM/c64YSHZpIbIVGyu5BgPVUuUj96IluNTormq0eRtySkB8VePQMCh6GGj6QRlyBxz2kRV5UAVm7Jttyut3I7l6uWAQwksomWRv52LxOZaAwcwAc0abry0H+U8zbA70EwoK4enLeeqM9wFdZM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711388011; c=relaxed/simple; bh=sSYwjOrOgKy6m8wve4tKsRPt+gTovOReL5XmBXqY8s4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Zc+1azNo1ioDII+Uibz0Tjd+/QoxrSfleWfGf3hhPF89z4ScwXaSer+7UTyxANWgkYiaYDkfOBjdHcJpJhsEp9CHaQw7KMB0+Phy5+wHZCsmCzVZ9x6W88F6S2vnqtj8yAnEKUBTEJOsi/cF0FRDkL9fjxz2gBEw5kJSmwPIKDU= 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=iYnb6iFq; arc=fail smtp.client-ip=40.107.94.64 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="iYnb6iFq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bd/B+HCeMqx96dg4jAvWE/Kb2OzKRKLT1XpaGxy6YWRq6NTW7ecaFgXyV/DkxIi7VqO4gofXSu7m4WzsPHgX9ODQun8rZ466FfyB5Vverc77qTj+OnyPLneiXexCPrek40HHRgVjBaWN62aGQUeceMUzRxXZLGfQgzV3gi6mOFuMT9cI6zmofkTwAMuwAipp7i6WpDpjBmDb9lJ22el5DsHrLJizKOD+kQei2ag24TtqSAMHvFrfAbAqGbdcEW0Pvu4tJ7hTWLB/wwiXjtLaHlMJhY7FpGipHJQb3BLfkl4wLIpBkEVT3pO/dPQz9JguqRCQyZfPmo8hfcf53xdDSA== 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=/6cJ6yKi8ZqS5c31O3GhLJGCv/2kZHpaea/0vl72qBg=; b=QIWFlcnwx/5jr0RHqh7iHsXBhQ3t66kuyRqp/cWKwYTudRdFl893jCPeLOOsdznOc3DlkDVcBpDIC/U3Q/DM22R/5zegLLjEO/ZK5SZh8brvdjT25rTH7UHrhjZyIkXj+iRYPPwBh4CxCNtrdAek0SbjwB2tMDf32uWvxCUUWLQ+YFza1+50nrDzl+gbYASMut3pZWJ5bVwEnwk4txJ+iZkWfABoUPWaf7LACy8IuCtYTk9TiKCGY2v2AxxhvmC5zSKk0ZH99E3KhEBIcjBG2j/+f+PPww3itN3f4TPoEqTiwvCETMuAtJcHf89e5hA5PAGAo9Cd60ET5on/kwvuuw== 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=/6cJ6yKi8ZqS5c31O3GhLJGCv/2kZHpaea/0vl72qBg=; b=iYnb6iFqp89sl24bHav/EZYS/Cb6RopvFVVTBFiGm/37Molm9eGfFGxEMud+iH6U3GKnuZsjJ5z1dKG35At1jEvsJR/D4Y+lcEjQHIy4JOFqmHVInjVQteAcqVgtqXSXX1n+HiKkHrhrB1t/dbdGFoc4W2kOfDNScBBYk/3qYbs1cGyq4Bg5a2xJoE9n9akArHxuS/6XOmSxU6qax09hK1Kp9HmnZDjsEJY9e6dEkZwHKuOxgV7aNT8PKxDIlDTZU3uEMF+IWBl+JMqDob88Y059l0CSzLU14872QtbpveY5ix8S3IsyMM8nsQHA8k6iedV9PtHU3DvBJovz67M4kA== Received: from BY5PR04CA0020.namprd04.prod.outlook.com (2603:10b6:a03:1d0::30) by DS7PR12MB6288.namprd12.prod.outlook.com (2603:10b6:8:93::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 17:33:24 +0000 Received: from SJ5PEPF000001C8.namprd05.prod.outlook.com (2603:10b6:a03:1d0:cafe::2c) by BY5PR04CA0020.outlook.office365.com (2603:10b6:a03:1d0::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Mon, 25 Mar 2024 17:33:24 +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 SJ5PEPF000001C8.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:33:23 +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; Mon, 25 Mar 2024 10:33:05 -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; Mon, 25 Mar 2024 10:32:59 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata Subject: [RFC PATCH net-next mlxsw 12/14] selftests: forwarding: Mark performance-sensitive tests Date: Mon, 25 Mar 2024 18:29:19 +0100 Message-ID: <7d32cc650373af8e477c193d77b7748913bb5594.1711385796.git.petrm@nvidia.com> X-Mailer: git-send-email 2.43.2 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: SJ5PEPF000001C8:EE_|DS7PR12MB6288:EE_ X-MS-Office365-Filtering-Correlation-Id: 811f4efc-3215-423c-8c53-08dc4cf1ac29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NoRezW23hTxO+N4waBeWfCjOACQ4qPzB/IW8k/RWlC01X388b/HSS9mW0ixOk1wss7A3Goh3cBMV/9avxMe2GUnT6iaqMHldn0uAG1SXxqf0ewqzIHv+RxxWIeyWmTioX+1GX/WqykJklptsHhfoN85IceXDL67FsH2zjJxVRMeYfOitQIDFsVNgrVsKJsSZ3RvnxTUby7S/8bxYnfs1uSJfIgBYAOhgjhh9YvvimwmgjyLrRjGr0yTu2KpZx1ZPlADsQplWXiNb3dDmRzyxFW+hNzAYvR7lQ22NgGtl5CBVZ1HFW6NaiJ2m5i/CiTderY3o82ekyMmOGfyQSOx3OJkSN95yDnn9AH7rUPlNYrQstk8sRSqnAbh3lAJ7SQ/GR9+MnrNzfLBrVsvRvkYPXfcHAF4fbM0gqrvfbOALyASBw1gS7hbtWeR3502kvoPww2yzb2N5XJ5BZl3Oj3eAuh7FcWkqZb8kNaA58IBEoici2hKG47ctNLfytfve7C0nWzIPm6RDsWckcEV0AsAFJAvyPLSEddzDga4iap1azOBaAsjC6ZehhADUefoOYluzhic5Tm3t9RQk5Igd+DkKh1pcCGEQTqveg/TBn6E+ZYBvZQiw2OOq9WOGele0OCTqEeYXbebKDY88R9veu3vKKP1ohzVgcfGegZzIinkxFKdFuu1rQwH8zQPWH/KatOJVGV7PlHctXEgTFdFI573/zBG75fm+OJcqpIPKn1VHVngfRAayUgSbGvCxC17d8829 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)(82310400014)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 17:33:23.8688 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 811f4efc-3215-423c-8c53-08dc4cf1ac29 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: SJ5PEPF000001C8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6288 When run on a slow machine, the scheduler traffic tests can be expected to fail, and should be reported as XFAIL in that case. Therefore run these tests through the perf_sensitive wrapper. Signed-off-by: Petr Machata --- .../selftests/net/forwarding/sch_ets_tests.sh | 19 +++++++++++-------- .../selftests/net/forwarding/sch_red.sh | 10 +++++----- .../selftests/net/forwarding/sch_tbf_core.sh | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/sch_ets_tests.sh b/tools/testing/selftests/net/forwarding/sch_ets_tests.sh index cdf689e99458..f9d26a7911bb 100644 --- a/tools/testing/selftests/net/forwarding/sch_ets_tests.sh +++ b/tools/testing/selftests/net/forwarding/sch_ets_tests.sh @@ -199,25 +199,28 @@ ets_set_dwrr_two_bands() ets_test_strict() { ets_set_strict - ets_dwrr_test_01 - ets_dwrr_test_12 + xfail_on_slow ets_dwrr_test_01 + xfail_on_slow ets_dwrr_test_12 } ets_test_mixed() { ets_set_mixed - ets_dwrr_test_01 - ets_dwrr_test_12 + xfail_on_slow ets_dwrr_test_01 + xfail_on_slow ets_dwrr_test_12 } ets_test_dwrr() { ets_set_dwrr_uniform - ets_dwrr_test_012 + xfail_on_slow ets_dwrr_test_012 + ets_set_dwrr_varying - ets_dwrr_test_012 + xfail_on_slow ets_dwrr_test_012 + ets_change_quantum - ets_dwrr_test_012 + xfail_on_slow ets_dwrr_test_012 + ets_set_dwrr_two_bands - ets_dwrr_test_01 + xfail_on_slow ets_dwrr_test_01 } diff --git a/tools/testing/selftests/net/forwarding/sch_red.sh b/tools/testing/selftests/net/forwarding/sch_red.sh index 81f31179ac88..17f28644568e 100755 --- a/tools/testing/selftests/net/forwarding/sch_red.sh +++ b/tools/testing/selftests/net/forwarding/sch_red.sh @@ -451,35 +451,35 @@ uninstall_qdisc() ecn_test() { install_qdisc ecn - do_ecn_test $BACKLOG + xfail_on_slow do_ecn_test $BACKLOG uninstall_qdisc } ecn_nodrop_test() { install_qdisc ecn nodrop - do_ecn_nodrop_test $BACKLOG + xfail_on_slow do_ecn_nodrop_test $BACKLOG uninstall_qdisc } red_test() { install_qdisc - do_red_test $BACKLOG + xfail_on_slow do_red_test $BACKLOG uninstall_qdisc } red_qevent_test() { install_qdisc qevent early_drop block 10 - do_red_qevent_test $BACKLOG + xfail_on_slow do_red_qevent_test $BACKLOG uninstall_qdisc } ecn_qevent_test() { install_qdisc ecn qevent mark block 10 - do_ecn_qevent_test $BACKLOG + xfail_on_slow do_ecn_qevent_test $BACKLOG uninstall_qdisc } diff --git a/tools/testing/selftests/net/forwarding/sch_tbf_core.sh b/tools/testing/selftests/net/forwarding/sch_tbf_core.sh index d1f26cb7cd73..9cd884d4a5de 100644 --- a/tools/testing/selftests/net/forwarding/sch_tbf_core.sh +++ b/tools/testing/selftests/net/forwarding/sch_tbf_core.sh @@ -227,7 +227,7 @@ do_tbf_test() local nr=$(rate $t2 $t3 10) local nr_pct=$((100 * (nr - er) / er)) ((-5 <= nr_pct && nr_pct <= 5)) - check_err $? "Expected rate $(humanize $er), got $(humanize $nr), which is $nr_pct% off. Required accuracy is +-5%." + xfail_on_slow check_err $? "Expected rate $(humanize $er), got $(humanize $nr), which is $nr_pct% off. Required accuracy is +-5%." log_test "TC $((vlan - 10)): TBF rate ${mbit}Mbit" } From patchwork Mon Mar 25 17:29:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 782417 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2053.outbound.protection.outlook.com [40.107.237.53]) (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 5A9F4131BD8 for ; Mon, 25 Mar 2024 17:33:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711388020; cv=fail; b=giTwsR2+zvfPoE9AFD6CHHBAije8y2mklZ4gjlfifvPN5jwpj6raue6hQa6mwqa83cnlSm6SR3GgOqh1LMzLgrvr/j7tzUPKWiaZX+bbwBcZBsAea6vg8x2sGPkc5imzVAYwrEEyfaammGcI+s9c/GxbLWIUNPVSs7MhUrSJGV0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711388020; c=relaxed/simple; bh=zv0E10TEsyjia4g06g9x0yDea/8AoDOWrXuHKci5zM0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lyHHgxp9YwXH8kNPCGguF/Q3MlcrUGOSkA3umdengsfyMUmmaK5jbe65BGnx/05BgMq5D8SyNP1lvvwEGY6f3n+FGlvWvG3/d2xip0eSLZrYba/4/55BAVA0wMZukkN9yKD6LE/XwH58BLGIRaiwhZHZU9dQzQJ/5j+S3RMrykQ= 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=lrsii+6/; arc=fail smtp.client-ip=40.107.237.53 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="lrsii+6/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b4DDcH64BVoCsCRykCi9lXZA7VAqMJ4XgM4FcECnn86FSOmbnxZm1h2gOXukscRPZYMHHf+M4/JaqE3B71KBOB7RP8+WbNLbnaO2NOIHovuhBsHCnWCtelRTQza8GRQ7GLGirO6F0rG2B+a+3dX2b5EVjkJ1kafA+C9d2anc32midVZ+2jgQXKzcbvgF0mvZMpnwDAAlzaRpiHkTWa5Az/sJufnQUTl/wm/3NlNf+T5VB2E7Hye1dKbs1Qi0WSoFV2wyrGPj19ZmvBdGj+m4zbvdz2Lbx09dIkWnNDndIms8sXeWbmu/rZMS3OWweXo+0L8EXue6zcpJ5LfITpAAVw== 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=RJRtP0KreHhnjKzBTAkDh7Y+kc+/mjYoR2koFRvwwCY=; b=BIV6PXVYSj9GKI9uicUNkG7y7PWMJXXYH13k39S1ekshGN88T0K31pReCaYzIRIMQd4SNOoXx6JIJoZxBdJWWAfndOPoB2KwTHc5/YZjWzJ+07tjP8jeRaVp/9iU3ONRk2FxCWNJCeCDelbS02Nrc9/VeaB5OGRJREJonDYMKb7X4tOWmcSwOpBKLcnclkt/g+YdF7h52ttkHQ0bx0iSHxB7stVqIJfcJknitqFPvA+vjsBfAUW8EHwFy8qbqmQOMCnAICKqcMqbQTMJdIiMosfc/8ooNOSPpFyyiI11uRR0ZMFUOSEq+Uc1VeWqICfohYkbBeSgbK4yxpvzwG00sQ== 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=RJRtP0KreHhnjKzBTAkDh7Y+kc+/mjYoR2koFRvwwCY=; b=lrsii+6/wsMWPfMz9g/ZcaXi2Ub/9YDbaYJ6I9HCZ8XnTq0svzsGeHbZ1w9NQkCoMi9+4FQJW/VO+rHaX21OWaCeuF5/jBlj9kC/5G8wkX5VDRbpd04L+E7datlxdtaJQT0eJ4DL/ECQxD8cCFLWGA6B7fK+ytss7B1796Pp6EYezf0Pa9OfjmOSezdpSIFZXyLtfk2UERzVDf8Uu8HFQdiGeJ7R9HLpRDkh73jtQleGCPACmmElCH8oMdw19GZHZlj80oigE/rQKMCPHReLzqw6DvVKWyNnGQU2QiV6FPmYH4wnqR70gEvVAp1SOKl333d6dl0BYUebcXjWw/J/5w== Received: from PH8PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:2cf::25) by BY5PR12MB4259.namprd12.prod.outlook.com (2603:10b6:a03:202::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 17:33:34 +0000 Received: from SN1PEPF0002BA4B.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::39) by PH8PR07CA0027.outlook.office365.com (2603:10b6:510:2cf::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Mon, 25 Mar 2024 17:33:34 +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 SN1PEPF0002BA4B.mail.protection.outlook.com (10.167.242.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Mon, 25 Mar 2024 17:33:34 +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; Mon, 25 Mar 2024 10:33:16 -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; Mon, 25 Mar 2024 10:33:10 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Shuah Khan , Nikolay Aleksandrov , Hangbin Liu , Vladimir Oltean , Benjamin Poirier , "Ido Schimmel" , Jiri Pirko , , Petr Machata Subject: [RFC PATCH net-next mlxsw 14/14] selftests: forwarding: Add a test for testing lib.sh functionality Date: Mon, 25 Mar 2024 18:29:21 +0100 Message-ID: X-Mailer: git-send-email 2.43.2 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: SN1PEPF0002BA4B:EE_|BY5PR12MB4259:EE_ X-MS-Office365-Filtering-Correlation-Id: f61c3e10-4673-45bb-f738-08dc4cf1b251 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lzxffjydJdFSIm/+LqQTIcLq+1j2EtUoqcrz+1iDHXkNYwnsQW+pp3ObhoOBBRapdcQNeuMlpA8jcXRy6Dovv1s9692LLy98HiEtsXjfR8uqbhAD09F6V9sP9vR32lYJWmzppT/0ED1uzTYuujN1stQqszdPTZ3do1GdxL59zIo8XLYJM2+nO9oyIIybV+YVpEmR+2ouf2XOCNRgOZDwJ8e4ggE72VhqWeSEioGUYY5J0PBuaIkJRpZ1pw9GUQDNi5RC8EvKFxXiSGcA9V+gaq3OXXZTeUMxaRwRpRw9hV811zpjPm4BGPJpDFfMARkJ6F1Wht8JVYiY54nS8cHOc0/u/RatRWFrAdI+xS0OMeZuaZM8zEeEUJoHJ9FvS/Mt5w+cvLHUG9caSXmoognZqvQh/BMxw5uPK58pzO7V+xZMhR9vqgtNTK+w2hoE+3dfPyANPk+TjYk96BtP5ckDCKqw7+PekYcWa6Rtcwq9TMLds6EYV5RnAboYp1ahhpcl1uaM4OlEBW8JLraiZjlZMU1efCDFai+dPo6mFbOKIgOmuqBMO6du2LD6d1cc1TcCnANotDJ6tqlLOlbnnGKiZW8SYBhhq3zDw3R+tQNGpHq5QFmFmIaTkUb/cDI+GWijZSCZkEGOF2UyNL1eCjXucFyJu2cCh+WAw3abGWtfMMHYt/1nJ0lCWKP3F78F3TThsehsieE8M7G9pWrf/NTg5tS/nMHVVhO71xq64/hr2+rXam2ReaUZH8Svkksx8n4U 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)(82310400014)(36860700004)(1800799015)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 17:33:34.0907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f61c3e10-4673-45bb-f738-08dc4cf1b251 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: SN1PEPF0002BA4B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4259 Rerunning various scenarios to make sure lib.sh changes do not impact the observable behavior is no fun. Add a selftest at least for the bare basics -- the mechanics of setting RET, retmsg, and EXIT_STATUS. Since the selftest itself uses lib.sh, it would be possible to break lib.sh in such a way that invalidates result of the selftest. Since the metatest only uses the bare basics (just pass/fail), hopefully such fundamental breakages would be noticed. Signed-off-by: Petr Machata --- .../testing/selftests/net/forwarding/Makefile | 1 + .../selftests/net/forwarding/lib_sh_test.sh | 208 ++++++++++++++++++ 2 files changed, 209 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/lib_sh_test.sh diff --git a/tools/testing/selftests/net/forwarding/Makefile b/tools/testing/selftests/net/forwarding/Makefile index 56e3557ba8a6..fa7b59ff4029 100644 --- a/tools/testing/selftests/net/forwarding/Makefile +++ b/tools/testing/selftests/net/forwarding/Makefile @@ -37,6 +37,7 @@ TEST_PROGS = bridge_fdb_learning_limit.sh \ ipip_hier_gre_key.sh \ ipip_hier_gre_keys.sh \ ipip_hier_gre.sh \ + lib_sh_test.sh \ local_termination.sh \ mirror_gre_bound.sh \ mirror_gre_bridge_1d.sh \ diff --git a/tools/testing/selftests/net/forwarding/lib_sh_test.sh b/tools/testing/selftests/net/forwarding/lib_sh_test.sh new file mode 100755 index 000000000000..ff2accccaf4d --- /dev/null +++ b/tools/testing/selftests/net/forwarding/lib_sh_test.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +# This tests the operation of lib.sh itself. + +ALL_TESTS=" + test_ret + test_exit_status +" +NUM_NETIFS=0 +source lib.sh + +# Simulated checks. + +do_test() +{ + local msg=$1; shift + + "$@" + check_err $? "$msg" +} + +tpass() +{ + do_test "tpass" true +} + +tfail() +{ + do_test "tfail" false +} + +txfail() +{ + FAIL_TO_XFAIL=yes do_test "txfail" false +} + +# Simulated tests. + +pass() +{ + RET=0 + do_test "true" true + log_test "true" +} + +fail() +{ + RET=0 + do_test "false" false + log_test "false" +} + +xfail() +{ + RET=0 + FAIL_TO_XFAIL=yes do_test "xfalse" false + log_test "xfalse" +} + +skip() +{ + RET=0 + log_test_skip "skip" +} + +slow_xfail() +{ + RET=0 + xfail_on_slow do_test "slow_false" false + log_test "slow_false" +} + +# lib.sh tests. + +ret_tests_run() +{ + local t + + RET=0 + retmsg= + for t in "$@"; do + $t + done + echo "$retmsg" + return $RET +} + +ret_subtest() +{ + local expect_ret=$1; shift + local expect_retmsg=$1; shift + local -a tests=( "$@" ) + + local status_names=(pass fail xfail xpass skip) + local ret + local out + + RET=0 + + # Run this in a subshell, so that our environment is intact. + out=$(ret_tests_run "${tests[@]}") + ret=$? + + (( ret == expect_ret )) + check_err $? "RET=$ret expected $expect_ret" + + [[ $out == $expect_retmsg ]] + check_err $? "retmsg=$out expected $expect_retmsg" + + log_test "RET $(echo ${tests[@]}) -> ${status_names[$ret]}" +} + +test_ret() +{ + ret_subtest $ksft_pass "" + + ret_subtest $ksft_pass "" tpass + ret_subtest $ksft_fail "tfail" tfail + ret_subtest $ksft_xfail "txfail" txfail + + ret_subtest $ksft_pass "" tpass tpass + ret_subtest $ksft_fail "tfail" tpass tfail + ret_subtest $ksft_xfail "txfail" tpass txfail + + ret_subtest $ksft_fail "tfail" tfail tpass + ret_subtest $ksft_xfail "txfail" txfail tpass + + ret_subtest $ksft_fail "tfail" tfail tfail + ret_subtest $ksft_fail "tfail" tfail txfail + + ret_subtest $ksft_fail "tfail" txfail tfail + + ret_subtest $ksft_xfail "txfail" txfail txfail +} + +exit_status_tests_run() +{ + EXIT_STATUS=0 + tests_run > /dev/null + return $EXIT_STATUS +} + +exit_status_subtest() +{ + local expect_exit_status=$1; shift + local tests=$1; shift + local what=$1; shift + + local status_names=(pass fail xfail xpass skip) + local exit_status + local out + + RET=0 + + # Run this in a subshell, so that our environment is intact. + out=$(TESTS="$tests" exit_status_tests_run) + exit_status=$? + + (( exit_status == expect_exit_status )) + check_err $? "EXIT_STATUS=$exit_status, expected $expect_exit_status" + + log_test "EXIT_STATUS $tests$what -> ${status_names[$exit_status]}" +} + +test_exit_status() +{ + exit_status_subtest $ksft_pass ":" + + exit_status_subtest $ksft_pass "pass" + exit_status_subtest $ksft_fail "fail" + exit_status_subtest $ksft_pass "xfail" + exit_status_subtest $ksft_skip "skip" + + exit_status_subtest $ksft_pass "pass pass" + exit_status_subtest $ksft_fail "pass fail" + exit_status_subtest $ksft_pass "pass xfail" + exit_status_subtest $ksft_skip "pass skip" + + exit_status_subtest $ksft_fail "fail pass" + exit_status_subtest $ksft_pass "xfail pass" + exit_status_subtest $ksft_skip "skip pass" + + exit_status_subtest $ksft_fail "fail fail" + exit_status_subtest $ksft_fail "fail xfail" + exit_status_subtest $ksft_fail "fail skip" + + exit_status_subtest $ksft_fail "xfail fail" + exit_status_subtest $ksft_fail "skip fail" + + exit_status_subtest $ksft_pass "xfail xfail" + exit_status_subtest $ksft_skip "xfail skip" + exit_status_subtest $ksft_skip "skip xfail" + + exit_status_subtest $ksft_skip "skip skip" + + KSFT_MACHINE_SLOW=yes \ + exit_status_subtest $ksft_pass "slow_xfail" ": slow" + + KSFT_MACHINE_SLOW=no \ + exit_status_subtest $ksft_fail "slow_xfail" ": fast" +} + +trap pre_cleanup EXIT + +tests_run + +exit $EXIT_STATUS