From patchwork Fri Dec 22 13:58:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503356 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 853E5199D1 for ; Fri, 22 Dec 2023 14:00:03 +0000 (UTC) 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="AWgycO+p" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ih5OJ0foCerVJSCfzPsUhgaJHeS5z4Npp91U/teWZYOYfnWXnNwpGnnegXI7PoOB5RgjhTMN1aV4b4yn5UHOpNWeWxzmGbLDFmL8MDhSS/r7gxEH6ay7Qapf08OnthnbGt3VjlGm+SDZioFZQQEBeD/7lOfb19dIzJJVL8hWJfpZF9+2D1a+qfShVvNo2dsY1k1XCH/Gymy+Kh2EFPlTA1ybATioYBPWoxE7W5PFSukmmEgF4yadb65QxBYHz3NdPIxjaPINzDSQEFBejgyFXAmt/M5D0XuiKSv5Afzy7zJ/Hn8zdZCKgw99AsIpIAXa2/3aQyc6iEgOjR95zWJvIQ== 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=9Qd75Vv1J2KCA0oAMAPgaUYjKOK41K9fgRRCJKyNQ1I=; b=QseRcVRNiXoRRDiF7jwWyI6hsfgrFt2FJhjPpAqoLIRkYJKPRDDyTAqa2YNYbFj5wkUdwaen7Y4UN/BB2DwrjdpNs4lNJwBTDdw6v2Yw54nGYr8fjn+19nOsaYU/+zphGMrxhTcQdZRuOY5Kjlto5izbm8QI2a5oYKQW9dAHkVAE6TJqBciX9JmBasEnHp0P5dl9Ao3P0vCoisaZD9r0XSdapoLL374/8wBOPp69K2XSpas5yAfprZ8dN2fVRXNPtd4SOpuN77aV/BgHiaHHdtbOrWNqle6zR+A/26yu1LvHyzFjKCainDz3NO/L09dM7b0Js+Tfsu3WAQetJ2st5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=9Qd75Vv1J2KCA0oAMAPgaUYjKOK41K9fgRRCJKyNQ1I=; b=AWgycO+pAaw/dIXvV2Jb6tAdX/ts+eC60eWSXw1i3uP9W+BYfAE55xHof2EmjrRne90+fedUuNpvspkDZvpYbaJpSyjI4Gb/PiWMpzS4c5pClCfGzxdrhQB1ZXmIlld10+NK4zkrArHF/p1wZMyr+NBlx1XifqwBlFzlVvAi1nAYdX1zaSNb9FoJETLIZ2WrrA0p+Y9g1yV7oGXV8mIMUFZ89goif/88AE02DcAZohmZiepc8Zt94D3K6TmY63k8j0seWBR3Ltl2GFk/RRWwUhBZmRBOzw4h+LC+N/7d39zHAMdpdxygWOpIUx+xMf80E0+VVuSkkhcTBS4bVMTAQw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:00 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:00 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 01/10] selftests: bonding: Change script interpreter Date: Fri, 22 Dec 2023 08:58:27 -0500 Message-ID: <20231222135836.992841-2-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBP288CA0020.CANP288.PROD.OUTLOOK.COM (2603:10b6:c01:6a::24) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: b7bc7b2d-a461-47b5-98d0-08dc02f649c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FPNn64U6rkkhSPlgyl2S1mAGbhU6fkB4ghlX58Xu24lTd4+4o/sruPY8sJxPOfWeQ26pcikvC+U6hEn8BrwZxnwCoGaiHRbHt9QrGBYCZb+NVHfD+QPeg1c3jT3HJ2yoOfykMvA2fmQvPgiNXHlHox4eIpvLMgKI444mevcw5z6kdnHK5Ra28tkNDa783yijHMZNXcSQeWZ42YbfTmoDx/oZJJ9EbGeNyEeVhDxl/EV5kMACgjJ+/Flf9EvVDgukthXI+D202sshLQKdXcp7TqOtUbmdvVSPdghcA9iLKI4RxNtCA5FoFH9U7bP/WLDMnmNKHZTpg4KgEjtP2R3RfGtyjFly/3BFDp4Pllzr3iYI4Aj5hr6FhbP2UdE0RDJmVDLETLi4Suwb/05K7nDnKsCJRhdISWSTzwo6wKSG5diYTnkUInq9HW6pXKYi1ijZcKuE13+Fz70r+EVpLTpD3Q5RXcRXB4oeSZWiHCFe0KHCqnWZdzkl90T79W/aaWNO5480gycQXtgmKYPVXV7OD4Fw1TszL8Lyp3P3XNi84SGq3kOO/CbxwC+pM1LvSq3q X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dsEjMZMMmIJISoAYLtt9s9H1ODtfzK33wbnqnrIw6i7k4MzNfkj9Tvyd1qGriiUbnlo6ozvLdVX0XYK9Hhkae0vbc0t/nO9d1KnEWF32yb4hQWQqDMwzvtgg2QfKTTCDV0KytV21DMK6QFX8Z4mDYnI7XrD0YWxx0zwZRF9uGC9lWIiNzZT2LW0vPIUJ79UujD3w+LkTR6sAM9RAiEmazV1d1Mtdm3qlof1QYxA/R/iGCrdJOIVU7xG8jjKwTsVLyBd3Fbjk22Aq/zY0QG2yuxHgZOvEYAhFb+c5SInopkDNphog+pGB4loiO2WvixPX3DLhJpCKdNqxb0So4QwgEKudw4ceT2kfq3UNv3amcvL1ua7tVG2h2+4xkxlJywr21J2aMvLThPKuAUFZDNPgam41Fh0j45VTanihKl4VTVlqu08ZbslY2GLBX8/uVo2lMFbDQ8iFd/59R40y5EUJr5M/UPrljtajgB/AK096arQtu6rwF08chpkURPHHMaX/vXzw0RWSXGCUyrX+Yj9GYs5VbaXBIEbUzPJuMv2N8EysaJbIBoxBJsp+X3VqVJ08HMYIt7Yr8QN80GxlMLnhw8DMVoqb0DTuLvxgX5y69gbZnfCTYaVe5itPADykZXC2RteY6jenR3eb4zEmXyt6JVvUP2DdWCshIJtqUtGGpt6hx5nZchaxmkdnZkBvpwinwi7EBBjjZhYZ5FEuytXKXsjawJY6pKMTelFWNWnSntUVnnyWDqr2AV1vNEGGBzj1XdzxMOw7QBf2L5AUy9gYhq/dL0pwYkCOTl8dceKXtji4Y3o3Uzc1oW6BFsT+rQ0qSWcNlV4Q4obOBs8stvL/PB41IaKL6zX1Cy6PA4KKdhCDMTAZbxLkyOQj/m7pLeDxt7wy01PDVN1xqXTfROyKBm41i+FiUHohxDiTaSQPE5wIHIiC32gx6Ecnu0xv3AVIqROxiJpMpAKPq80oDoJiY8OhnFjBz2cG25MVubRjCtKffjJbx5i+s3Z9vRAxlNn34DoekLHlfEx59jQpHw977wVQWBLAZ79eOmNY1L+ROVDQfXn+Z+MHSpBrlNGa8UU7iz7flEkeNHzIHeJrkkqgj5B5SpdRi0E/VDr9JZKIvaHHOt5bkt8pwyR4cD4IUTPpF8TxJugYqqvESe/fOjEZ65n9EcZ2wL2nNxAtS9SE0zssThtBp2S7oRLQv12R1x50XL2VuieeK7LMf3n+ayK3q7Z/XrT9/Ma04/5F4AIy1PzNyLnAtaUlq/V0zcPg6xbjzFC//XKTAHlJRkbJaUbd3A9STzB7W5kv4SYttzD69YS/6VHE2L/ZKunJeSw3mkZL20KkOq+SEN5rD9jzpyrORgtgs/77XifeKPl02Rs9rki4ZMBbfzQeJh06nyib/vOv1CSw0OT+ZtYO3sBusJpAVlRqYiedG0Kz5qKk0LA2Yk/TSAjnaahDE46iQR5j1K7YLJCO3OiJqmTdbslEMFQCRsMGmgsdojGo+A/Ff/+PiB4BKD0S04dmqZpaHeKc3pOdaa/OMlTUqcwmuO+s0d94/B5xWvuAlNtv4Tue8pR5T7+UuehsuOaaxZyCDCWlNHvc X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7bc7b2d-a461-47b5-98d0-08dc02f649c4 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:00.4557 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: x8iXHnhcgtYRaGIHxX7fGStiHNPYX2CDx3KrCAnxXYE3RaZ56ViJHxQcrx2q+IPPM5OnG/0xPQJpSPPi0dOjyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The tests changed by this patch, as well as the scripts they source, use features which are not part of POSIX sh (ex. 'source' and 'local'). As a result, these tests fail when /bin/sh is dash such as on Debian. Change the interpreter to bash so that these tests can run successfully. Fixes: d43eff0b85ae ("selftests: bonding: up/down delay w/ slave link flapping") Signed-off-by: Benjamin Poirier --- .../selftests/drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../selftests/drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh index ad4c845a4ac7..b76bf5030952 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Regression Test: diff --git a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh index 2330d37453f9..8c2619002147 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Regression Test: From patchwork Fri Dec 22 13:58:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503357 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 F21C01A71D for ; Fri, 22 Dec 2023 14:00:04 +0000 (UTC) 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="jniYahYe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzQdC/prs4rS1f2d6eQXjYy6ALfTbGPCnf3lo2iYIElXvo9cdbLhlfC3U6PP3+76xBMS50rqDqaNTQEdfxjhlicEXdMjDqSScWxt3Y3GZRtz7bgAW9ZhCIBlZqaeUSH0Lmdtw9tzs/5fmxAGliOiY2JGKBHwXjkaVxBf9ikxxk+PiMrOKd/TtHt7Uy2CXlZAielbjrmxyHnzZzZaVBp47QpR1U3oULBo6y+q2j4kHHsE9CR4b8rQJP9xq+IgNWen6RqjFYfoI8Bba2BikT4oU9EtFDx99VTlm/ekSHCPv6hV4tTYvJ0qtprbiRvnnpdiF+OK6PaJ3qFhkrty3Ui2aw== 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=jzQTiPKzwaijdYL8MQrIQLvPG9WnirSXavTTovLJ/lo=; b=Y90HND/BU/NyZz7+B2MqyQ2MzDWOCvcELolfjhJNksXWK/nAbhzm+S4+3E29Le/X4/pJxI5aIynSeXjJDHkdlukDlDl/CRCIwypXMAavR+SPqIRVK6XRMHPqhku72PfILg5nXFFlC28GtVN7Cr9hoYSfp57+oCoat+ZyRBx7W8FVj6xWA7NKVTz8gH3dXs1B5JrITtIV88bIu1RsR1kBm3AzM9U5dpY8mn6etV9w4cGqr/0AMWV26E6HkEzOblbcE9Qh9xXdrPW1uPrc5oJrbFVb7UwYqxDp0zbajd+TGHYH36ioaVdqLqMXDz3NQF4QL9GEvF92d6wB4VVmxt+2ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=jzQTiPKzwaijdYL8MQrIQLvPG9WnirSXavTTovLJ/lo=; b=jniYahYekmBObAZiCQqMiHDxMtyv9T7zs/xW2jwrprrAA3wujKmyrHe8YcCaY4fINFJCx3aGAth9aFnnaFFaRrUNvB2RFb0xpsEYCAN56rnxr1ny9ztlR1HzjZJrxoHHas0rV/SFH9c14DUy2yiQRpeW2FvdVurCLiX8x+kxVTYMFG9CUm0in78nyJHp8wDXTobQGdYnN6oOTkm10JmXKvhA0NSf8r/7PA2fJnKB4mu+TDtpWSUn/DPNCMb7ycPuT3kqsJo+D8inhbHumZpybEgbrA8uT4+3Uny4i7wHcmsan04R51A6hv/lQNo1whW3SNEoIiLpYxQVelR4qCrz5w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:02 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:02 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 02/10] selftests: forwarding: Remove executable bits from lib.sh Date: Fri, 22 Dec 2023 08:58:28 -0500 Message-ID: <20231222135836.992841-3-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR01CA0029.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01::37) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: f851dd06-ec08-46f4-53e5-08dc02f64ac1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PypQqe/0rzeTHxTn8UgKThOvW3BECECab9Dd66qGPS6TUI/VSeWrJMkiKX+OWrPm4Ky9qOOVVPEGuBu9xz1YYiNra/fmSY9DRElNmopA7kFMDYf94CpXznpxfmQgckwClKuETT9ll4XBd7M1IASdUGCFy3mPJ7lhhFGal2x92tEJyczEsqEKcB6gEmKFR9GOEyBwRdozZ/xHHNeKg1YW9YFzkNAwj3F0HTf4JudDgybnkkgG/MVns9ALJc/vh25Z7zAofWppvIa1ayunKqrDGrsDzGt+pACb6jlLZms1ZYk8ethBQ+7C7ZsT1rRMPAj7b5griRJ5dauUbP+zi4rvJqDhcN9fOb+CEkXBTN1rvJFA8ILr1DQWAzq/nvHvGVUSY+tJmwrz1QRp1341r+UnXEB3Th1244UnLpEnzCB/yImFDnPWDuoQ3vzCeDuA5ajWhgi1V1rZP4TsoqP5ptX3lyZOeoJuscEUHw8MgHxVGTUQ7UvPV0JjB3x7FZUdYIREeOex+xNXgNGoidBkwxVNZA+pU/DM3sPIH9SJuws2alhw8h3n+qcigtASgMAOP2uh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: loTXFL6Y1oShyeOI9umW3w+SHQqVb7/EOpKu9b5+Xrql6YYT/rJBpacUDf38P0LmSeJeotnmnxlzZ2kO3v/mKWaZ0gusseKvRvmIOpsGDbJqKwP6v2D68t/yl7vegsn/Zi+p0rT1G8sGrmyIMUL0AuK6mdRvqVV1OC9MpBHI9papeTTO4R1tcNzRDUXJ7kpaza7mDBfDXCSVrtluNie6itP2sjgzmq7jP7+Z2HZy6SoOUljfsgB9UdOvaQ/+dfsg/SmfK/KUf9BRvg8Yw97ztN/HuShbHkq11MoV8L7DQGcMO1jEeIz8hFhH25jHF39Owyd+QK6tXjH6PUOS8vt2W7y1vuCCTHT6j4nv0eCrJQ1QcxJSs9Y6svBM9V2Ppcz/5TUdmfGzHqml0QZuwdmhbNdh+Pkum/bMHne5IyO+HaMYH+pGxh1HTGEYkBoGv/8KEDaOoCCkYtPs3/HRQtNjhOQdCZhasCeZn09UlED9k+60vUAQ9dRJBFksKqsli0H7zBowk4uHHtXofn6v/oLoxO61/nZbzZbyCDKOdQ7aMlqABfdo2ZcyFaRbgQe9uwQj3vY1z/2cNRVEwCwx9WkP6+Wpnu9dUA+cAHaXr1fVH5lL0HZZ7bAGJRzkeJ1OMYqYUaDwR+g5Ukm0iwjG01y1/ogYL6niFONf8JwECZRuduAx/dI7g78XI5pU/JpcS9rFR/ssNX+qo7uN+FBrfrkdIyYkXemg/+r2Iku/1ThV73h3xznqMtl//+oZInJY6WDw2NwDTmvNi1cD4dBEs13cxhy09vKpGFVvlapkuL634yCVI3qmgckaJ6Zo/wdStFLnUimM5dyARGleW+qW6DNCD9O6cDhKMIiv0/lgZHjpmFCBetfv3yPcPBqwpmJMjaTuZrr1wTweHI3+udisUxwTrc2zLu6Z2skpsU7Jo3azVbjB4PbC34k+Nb3TxJT1IpC4RuYqvLsC2p42NMcxfBgqBfOT+ulNyrWU5RCCgfO2ISXtKypT06q1l2gqz9dngK/YNfPHD2DllX1tRrksTNS6JCjVtsNv7a3r4JFizEuX+jPuVveHBgMJLRgfHJEgHtD+m89nrznkZzHE+Qr6hlZwXoI3ZeTYd8ipvCfRniTC8CXZhEgKJcgKN5RwNHqoYnPBytebiUx1DvJmPHIw+Y4td0gfZep5/BOrS0mPwEJNIDvrm1baRhqLm7HQpefWzBJCcLNojw24+bqn37YWxgQjtOYR8vEJ1Sllb62Ta1sfWjAXbyu7/EDFiLn1Z4LFBrdFYvSkSu/8u15LhPgNQjlDKYDKL9NjFcHPX0+4VJYsKHrIeafDTq23J4vQgBfCrM4pA1mcocMENVookiZeQLj5dbMvJ2dDHoEbx4qwdyYgx+7f9BQtGoE/XMDvHR+fhQL6QYqkq7Gl22+v5vRhFEgokeDA1puEOSHihznJa798AIxOFJQf3RyPAFCa0rpiSGGTj55wNhE3kojyDDcd7eu98nsJm77pVBamuglBQ3jCJqNG9ZqcEWIW8kHcJ+wLoUZ9ca0W7mIDk2D9b5eSr+rE96hvwH6P+iJKK2NSDN9rd5PKF4HUWyR7YpfvTJygP6P5 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f851dd06-ec08-46f4-53e5-08dc02f64ac1 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:02.0269 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fOTLmURtMJKqU2kOgTO1oWvTdAvIXegxwy68CclgguHI8vqRB7c7UyNTPFVidcUi0R0eyyZqO/2IV4f+hx/xmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The lib.sh script is meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from lib.sh's permissions. Signed-off-by: Benjamin Poirier Reviewed-by: Vladimir Oltean --- tools/testing/selftests/net/forwarding/lib.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tools/testing/selftests/net/forwarding/lib.sh diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh old mode 100755 new mode 100644 From patchwork Fri Dec 22 13:58:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503358 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 523811CA9F for ; Fri, 22 Dec 2023 14:00:06 +0000 (UTC) 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="KFHbmI6L" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3MLSAcIDBLDPU3X1BgA+Mn/tS9ihzTIbAlZKnSCmcgPmSk0d6BaUgMmf0+08eDklI8Zde/BrpKBVJ4osDB4mFHihv1OLims3jVu0O/VOx7pjDtRvjVKVMrZFOyb9XsDAFFw04Jq3X1HHXG/VvsRB0IpuW4wNY3Mo5vyUdzysrsRNaCiSmtDV+MBzXWNcBS86upBl4IaOgloLO/3vx3jiQMdX/IUj8rBLETn7DyUHLs+xT3ny//SfTya3v6nLOF6M31HMNHNccljy5ompeXCgvRvHW2XvpRINas7/Eh5lbAnqOGrasJrFCTQMqoinH2BY/Cmb+9/4XNTeDu8aq1CeA== 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=XcvGaD57Jbo4naQ3een4rqsGAGZKL6+yDFz/w0KBgfE=; b=QzDVqy9nhnkFIFmnQ2eQqQ0J44jcyG1jZX5WoRrMWXUSTPQNP2KTNgAcs2RY2pqWLEfYFQyiGMpAO9nVXlsSdwL4Y7P1UbYOg7dygWwhLbca2Jit0uzaVwmr/uN8iHPvxg7jLN7lceqq5Z3eBrccttGeoQIt1vFQJmmiySTDjj79buZfAhTL1fN6f5jG4sV75jHaRy+UHeZ9Wp9I7Y7ljoxq+FycuA8icJx4bX9K90sf2fzQLsoBUZ+lRLnA7xI3/jSAb/q7YEoRgIbcNbZE4aJh4iIq2Y1msLRFE6yXGqA1UoXeeJ7NbxFM0OWKwH7ik3VEuCinQ5X6Dklrgktw6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=XcvGaD57Jbo4naQ3een4rqsGAGZKL6+yDFz/w0KBgfE=; b=KFHbmI6LMNiGLAfK6SCYulM/H1H5Xa4o3IQDb9rHyzQi7Dbf96Pq8YMDCfPoRFpLXWPjY/xhDwaSqaNVUEMWsKnUwOT3wwI32Zwp61qEPuPi2KcPIYNQcwiWOseLX3PBFJ/OfBVBpi8n9lAbWbgXwUim78h427rDArfI2PU+BNFbmMvVK7O7uZ8Hh/Jn0CRgbpNjU/NW4wsua2iuve1cuitZwLg5gkqBzqUXCC89Kwo2Y2UKkPLIMFHOhNyHnHZPrGaM/gZr5OP2g32l7UUuWYNbXcmi0JaagAJ4PF02WWeN1mrmUcqL10gcPi5gv+6aw5pIQeLeQ6Nl9x2+4eggOw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:04 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:03 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 03/10] selftests: forwarding: Import top-level lib.sh through absolute path Date: Fri, 22 Dec 2023 08:58:29 -0500 Message-ID: <20231222135836.992841-4-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR01CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01::40) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: aff6ced0-0d10-40ec-e3ca-08dc02f64bd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i9l6Km/1I9yZkTG5BHsjry4P+omt3D0LSD5xH/ahUsAHWDiRgYy9sCLMrgIgYt8rdFKShC4q+ir0Bnw/n2ofSEt5VtE4LPrxtsmODGjkHBBfulf9YbHAJKd1NYWi+6ki/HFCRiN1yGBRbzKaXsli0kFu8PbcgUVx7iUzlyYUmTwQh2ksd8U/iF+U7g1zMrS+nfIthGfmOrAQDiUT95VjHCAaP74XWiFSS9BN1omWcx5vTLXxmZUxOXl8ok0H7/Kbf9FudCqiRGXP23EANmXR6ISMthuXBJxErjxcQdeMqTVxvOnHIJehvohoLaeiKG84psLmkBRPxojBaANgkNWhZDi3Z5okbo95TQ/EAJ0qP7In/2t7DHuk/StYiVup8Jvx4S3TuFDG5omm75oOliXIttLdAQ9MSdwGi9pafixNwXhyn/cnpD23o0ju7tDPPSARDIR6DHdhpDGeJ6WwOaUKeVaMfssQEFvqLNV2KhEoJXj5sc1ghsRTX1S0xRvkfN2pCb66aQFeLnw0awJdldrtGTeY3BpA563P6n8tHuamtnIlBlpf1vGWiQAKQglTipOx X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hXfcVR3ADa4FKQmf2MGFDhwWb+DPkOnywSrQwPhlJxemh/1n1Ykiz70xRKjJia8H0lQLMPtYmRTRQovDrbnksbwlE8uMeQOL8DatEWU7FNiFTJb/Z5TFr2/I6RIX7VYTf94ORdTOyI9sGa4VD/TkL6dalsMq/CM4quK/WS3PbwO8kdzA0xlWJ8Dk30Rn8sF1LxGzZktohz/UEpUfZmRpOPVTuywZ1sXW1/9IMnkhH+kzaSXklj7YUzZn2+LX+BBpoLJ14VATTHdls3cGsMLkmO7iQZUvJ6ccjcnXTBpJ9nv0FXg1xnBYQmNLfZXaXQTBf/mjICFoorvmoastDF28GlwN1kmigDA1k0yTGFAf35Z5ci6WRngdjf4ygo2HTS0EuMatQTpKpZ63dZmQyhFqpR9sCk2wAIlGsoQvfxsFeV5ED0qp2GzwkTSOc3yFcKQBZHAMomOTK02YAHcc8ifzT8U5ckIuybLvRy0TK12MYWITTWy+uuPE7XyD3tlX8JOZCYYFWDx5Xi5OcwL4cFb16rpelRy1o1xq3syfXyCmPKOq34akZAWSlabkJr6G0wmiCUeyCUQE/oVoU8dU0DbTUB0AYo+GT3sTqmfi6KYOlB7UAhAJEzkZ9tE55G6VBSGIubJ2ZKePfCP0rIs2xP5uW5eD/gSPgGE5ep0vMigOMw6oPd8GnUBqdLwoG9U19za7Jp0SFoq+uH/mBCbhwNv32ECHCC+McZ3qhHMQq/dLBP778oQaYwv3B6K2CATwrDGQuw/IrpTOBn1O0cuhm4ENFqWnHx54IwyRRttE6SDzf8rKqiEwUXI8eKev3Fe4RLzRmSedWYC5yxskn2U8CHsCqTusRLfz4CJcNto6NUqCStf9tKIlPOmIjKEdr7cSk/ylsOh4oUf69lmllPz5XU0h0jy1K3R1RAhVOqjS2N4Nusv/sf9/v2Knle2MTldJbTTKP8IM3cVi2Ymj9QuRCL4K9/5rLzG7McxjQMwj82yEpMxt4ddydD5PKevPek/YGSjpM0G5Aa2o0uwYdbkpE6FFIuggTK6L6ffMN2Ho9GT6XKDOgkpr+a6GQ6RH+RBElrK2kfRiJMvibhFiueEpIZfUNtDsQKlzYtmubmJ9OQw3+MhtutLMihn1Z0XBp5R7knbeDcrDhUzxdnuj09sDWq0GTvLnQx/8YMPzK8n78xUlcgJGyOqI0UktzFlvXE1aPVp1arvFEnQ0gB+BsmA+YWhrNDu3ctzfrRl30mxGwvjX40xQ+RAHni+zattDM25LDz9hZGWXaCLy77sh/CZ8OOV5lUjBUG1vHKmAJwR37i11GFYjcSucqZb/OMDIq2DVaKj+dTrROcOYr12ERUE+xb8s+KEvVAE9cNYqBChOrjr7LKPFY5IKNYO5rB3nASwzurU/mrlWFFB7VevnQRTQwLNQqPA53XEghRrm2NUmt3aSm4e6BPiD3vOt6PdbF05HPEd9++zWwHZdaI3ZATL5DucfJ6h7LAzBU7U/VwuAKcct1M+8ykGQ8MV3tEEvwJqlfTQPxg9Ukc1SJsylTCfphFo6YAWJlKzAWQiPP4aJ+dU+T1Vouf66sRrdDmJjrGqSzrWz X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: aff6ced0-0d10-40ec-e3ca-08dc02f64bd5 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:03.8858 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jjXwov2alkCqZoK9kRaxijr2iSYwpQ/wKgXNOCI3PyoeDnTg64r8JJhC/RBbMFQDdJToi/E8rb2s/2x8qUMKEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC From: Petr Machata The commit cited below moved code from net/forwarding/lib.sh to net/lib.sh, and had the former source the latter. This causes issues with selftests from directories other than net/forwarding/, in particular drivers/net/... For those files, the line "source ../lib.sh" would look for lib.sh in the directory above the script file's one, which is incorrect. Instead, use $BASH_SOURCE and dirname to determine which directory the forwarding/lib.sh resides in, and use that to find net/lib.sh. Some selftests (namely drivers/net/bonding) use a symbolic link to forwarding/lib.sh, and source that instead. Therefore pass $BASH_SOURCE through readlink to resolve to the ultimate file. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Suggested-by: Hangbin Liu Signed-off-by: Petr Machata Signed-off-by: Benjamin Poirier --- tools/testing/selftests/net/forwarding/lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index e3740163c384..f9e32152f23d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -38,7 +38,9 @@ if [[ -f $relative_path/forwarding.config ]]; then source "$relative_path/forwarding.config" fi -source ../lib.sh +libdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +source "$libdir"/../lib.sh + ############################################################################## # Sanity checks From patchwork Fri Dec 22 13:58:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503359 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 AADF51CFB7 for ; Fri, 22 Dec 2023 14:00:07 +0000 (UTC) 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="mxAHDhRI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RU/B+MvCfnuhqMTUjxLwEyP+NocY/zGxNLztLa8u8jZCMvFZJvVfG3oHPzFcFxxJ8sPjnXVMAhxE/QABWe0oxH4vn2uxlRY/15QMuMt4Lwxb2T8MmHtZOmVCnFCouquzOKhMQSZAacHNdv9gfqoP69j4NYPg5jFUx20GY3BRx3bRoQK6tkihpgHJAHUSSexiRm/bByXbf1qngfj6MWod/IB15CvkWI7un0bOZ+RhsJvvylBIjy8vFYejc+YDloAEjtIndIupR1odygGVKR3OWNqf+rhDoQItd+29LpCtLVXow0Yf9SJRxXWI2GVqOQc5QqOKhGt6VnvCQYW6RhnwAA== 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=3WtVqHP76gMAjlS8NJdNpYx7ZC5yPiSoGjifWH9K0Ms=; b=dja/AN3gp0nsGQAp0PpYgJJG5nX4sAXBISBXIG/ZMOCscs6fG2ykBTJoIezDzH18wtwVjM48XjFacW2PP7rEK7w0IPEY3HwG/eE6+1bXac2BHIDk+vnaMFd1ALyVVNRf0UZryWZadrVbGETNF7diPuh2qxEdRxEZkOK27LxfiK2QtQnGXJyOOYV8HcrMesUtQCcEnkR3twYY7M2NN+rK2GQXw1gA3baGLyAFVrEkG1dj0jLyTJndvG+P3pkg0rj4Ji0rbSOUtZ2qQUYUj8c+BOzM9eQlEiKzh3oaxOkCUykeaAq4uCry4T6OhrGfarUDfbNlX9lf647A+vbP8Armqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=3WtVqHP76gMAjlS8NJdNpYx7ZC5yPiSoGjifWH9K0Ms=; b=mxAHDhRIgmlYdxd3IXjhaqkZz9DcfxOmpkWwQ9DPMBpjd1OM1WqCNKBFAmn3R34UeSszHkFOYSsi6sGxAx7Yt0anG3zfNnA/YHy23wplP/eaFw8ZmjqJboZOCrFvm1Oup6Q3zILLz2GlsyGlNcMbwCbIov4Ag12eDK1+NwpNn9myjjGfGU4i+b6cKiBFQCzwnNorZdHU5HJQAkDG816ojU9JUTujD/zVxMvnumK4XJnJTDx1JmlZMO+NujFaMK/wgcsBTq5mestiR8SHgOY7XGj6/EXa/0ymDD59dGWWruWA1kWKjzzbV5+VLkUYmuuN8Imv2yFYTaGOzlh77rIyMA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:05 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:05 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 04/10] selftests: forwarding: Simplify forwarding.config import logic Date: Fri, 22 Dec 2023 08:58:30 -0500 Message-ID: <20231222135836.992841-5-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0223.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:66::12) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: 20d280cb-319f-4f07-c65e-08dc02f64cba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ht5H0a4eWUBUC4TT0IjYP6DM6UWNvaEHt1sUtUCSs2TJAiBGTl4eNMJ2QAavEkXyPJKjdiwdUwg3ftQmwCzq0YUEytHhp2OP5WWjsr174BT8Tmx2HRM3Z8wzcLwYs7fVqVNQScHACKHC1IATUI/VyrAfI6C4UjfwLKVY9eb4/PeykijAsP/0qozdSmjqQLzKvOot5BzZacpavsZp85sRbrTqf7isr9YPn5rVcFS9eMfr7AWqHPoL5h1VN+NkxPNs30JgxH0eZRZV17j0BKYytbPOEFRe5NUwAlC2PYoASC8F2B3D1m//zee3GC3BHReuUngo1odc5vz4UxwNqJN6HVo3+HWC6OOCTuaR0yhRV3s7YxceV9Pt6xS2BE3jOYphrmw885b2Tw5/3YQUYmwk+aPkSMwi2TZW8M9YpscUFjq4tm4PDHt0550Gtf9pLiKWtTOJ1Efgkwg/qmOIrd0pSAMFEDAY7iXOaTO6+xQuai7zYQbQ74FZeoI11j0/7mlpK99DuXUDgiGda3cVV1wcebvHX3uMQLbq6WntJsa05yi6w8P8Zauuak8pcUBKSP2Q X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nDH+R+dm8KbZSyQQavvZ9pt/8UeFpiQVHpldg8UEy7ELtBwVtzsf/aYKW6/viW8W6E7adYOI8CyaJ3ukaHzpxzRD0ZS8Zort5V/ZzY3StdLwLRUxMRVRJxDuQ4utTE1VP3gccpwjwe364e1olJSmGZL7ZDgME4fkxWQCih40SeXE9oi8/QO2Pe0Zx9kt8EP4VgueaVglcJlGxoLG3eWFAe/0MWW5gAQ/C4N+Hu6UAyGXo0oRsAnL55YC5uxFPKLnt83dfsGsIJlydPrYm4VtKrtSEbI2M6eGFIrYLWX9VBtQzZCC5jpNZK/egaii8Llnmf9mBJHQPlsKEs2yar2d6lz9e9NEgazWuWVkzQiL0RPavYNWMnGoTwXjOUYrc8L0Z4bJ2NcvMmlgQYepz3y1BHpyFSahtE7koe3ns5nVgBvl11EBV3IiF6Oe82727bdIv7YhVKS/EZZHeo3tv+SPJ1aJs033vJ9vTce28a6haxq6OVE5tySrIBvdfYS/wh9Gqmlxseu/vWtXjKqCk43zXr0jCHFp5zwFxTO+m/7LWsFF+Gb9XXk/RObFi+K2g8MglDndpHMB2MPzp7APyFsrHGwRWVq7rxJwXquhaEIg7kSBfySeD8QyxDvGfDJcv09pQjafQg1SVuHCVAqvRuxZLKd6o1KXUaOhNdBRNaYvkTOL51/svAN0Cfdtu9HOdvahSDX7wfBBb++xWsOjHfATxCNIYjW4zP2U76xVD3zf6JXuM8YMV2N/Tw5j+1MBfd1ZgBFUwTXhH15nQ2AxuyijHAQSLVzwRp61Ex/peMw2uDauRjcTI/gS5xIbJ8B0jPdU3rHz0qqHlwTo4kQb2sjdsjwbgu4eeFQdYEQaQFA+tbyIeskiXrdp4pQ+IxffO7XvJewHuRuhZHWBZzcYTWqLLFDRuSvfmpA1JHOc0ldGoVysW7oHEYXbPFHhXNOL7aI3XQmYTAWjOC6qbasoWRqgZwBfusoqR2CbOpHSWwNYPAOhyEkbhs2krZBZRVZ41PUNVjn7oDDzZnNZ34eYIdnnVRXcL6jePqtJx+sQBW894M9WpmafKc/rrepXF62UfBBdRRkeOLsIkpgOiR79kmkvuDbIJ64xoJ0inLEtDluqeQa/VIZKjDCbKo/c3TUWKi/41Ea7Gll6sViDdib3lUBBw6+L4MDuz2tBjQdX+qJ0Z4ZKKhwD/J3GJuQ1E5RqJ8iDKjlmQCqtIYqEhVF0PySY+1p7OEsZLeV0mLaYwiBmtSlAU9h4ACH9P0ACEvDwyHQWJO5B8XWiGUjtCDkUEoO2jKFpApeyBCPZJNAq2xegB1J7xz8RxeOaU8qBflOrP1Z+VwwG3Q8ids0J+1kljMhqsrqgvvy7OpwyAB5TeuXaPIM+MlCz94dC/til1XY5rpttp/4qNI0xwU0BqfICA9Y5fMZtn8FyJTGtkCZU5kGMJ6BZTeQBgj21ZPokS+AVCBerNaRk4TKc2EXnneZZFAKODYZvvQN0Vfm3lncnu08n9pxHnQznNif3vHrkTJSrlLkZjUqSNPalKKEX8vguDlJasPP6DudCqnGSVa4+Oq6ECHPSocyLPjmn1SZ72sOpyypP X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20d280cb-319f-4f07-c65e-08dc02f64cba X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:05.3519 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: myXXbWvQ5vNN13/EomoQJyfbYTdOECz5a4wNELJZicVAUky1Qj1lh8TqZTz/4U0XPrddnTr3O31bEqhWvgba3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The first condition removed by this patch reimplements functionality that is part of `dirname`: $ dirname "" . Use the libdir variable introduced in the previous patch to import forwarding.config without duplicating functionality. Signed-off-by: Benjamin Poirier Reviewed-by: Vladimir Oltean --- tools/testing/selftests/net/forwarding/lib.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index f9e32152f23d..481d9b655a40 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -29,16 +29,12 @@ STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no} TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=} TROUTE6=${TROUTE6:=traceroute6} -relative_path="${BASH_SOURCE%/*}" -if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then - relative_path="." -fi - -if [[ -f $relative_path/forwarding.config ]]; then - source "$relative_path/forwarding.config" -fi - libdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") + +if [ -f "$libdir"/forwarding.config ]; then + source "$libdir"/forwarding.config +fi + source "$libdir"/../lib.sh ############################################################################## From patchwork Fri Dec 22 13:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503360 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 3690C200BC for ; Fri, 22 Dec 2023 14:00:09 +0000 (UTC) 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="iMVmY8uh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JtGfIsc0vDRtEmaZHKKVATacvEn/T2jKB504vNIJwlri22FqwvJ+GM3vSe6X8ttkWpC5t9rpWLVHmyKAgiEbhAzP7jOLo6WzAwsD7BVydaMAweNjM7Vffq1cBTY+gSe26/mBD+qP8R20MEhwpIrordB4X8WImwUdetmlRUa7Ip0tdIJToI8nwry4572NbcRZFG11ut/orrBgEo21UELyep+PHYLPh1/iAtW63Przqd1jcQUyCi+J/IpG0gcsCVGrS6pSrtFJVgB6m6xDUl0WfNe08n9bntVDwxOmkK9Wi6P142SLxi8DYztqUQXQuUjM0w82tczy/2XCA/HDHOwHAA== 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=1piugxe9wcOxwRBzSTMx7EV1K7qKn1+nhdaCinw7v3k=; b=YHLeUqpji2fzdlFf3MoZQhvyJwMzyAIW2pS8CmVIPDz+q7tXVNSr7Q80QeEIlFbo7q/Xqy84HKCfIYj0Mx4i7NzVzhYRv/XVL41j5QuoiehTtC62X6YG3nutSlE/9YlIIn+FBGiSof2nITXl20DNDRKxy11y12C2PpcnPCyRMDWVnYRDYa2RmOfNqj66eoBoJYcaEzY+iDi1gU+xONL3331od///P8+qE9+l5p/8QtGpz81zwsZ9Txd163WhaHs9bYEl11Dtk4BOHeAFPuIkDr/sZIoqTCE9C9bZZKvQiAsnqc/SFaS7S3YiBHZw1oRo/4G/lG4tmatNFTnAA3MQng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=1piugxe9wcOxwRBzSTMx7EV1K7qKn1+nhdaCinw7v3k=; b=iMVmY8uhBuAKDZdhj7zTxtb0DaOQuV7ZY/LEfVmAVu94aDBdzDJvDzWOYq6zhK4tz6CMx2AVaHdSBr1HM+A2h1gcGqPpcCQy3B+EZOfaI+SaTCXz65umYS/JQKntwUehoOvmY7NfjwyFi+m0iCqhAmHuzJMz3HO0v6vdM87b/uFrXfktPPam7v5q2mwj3eAmWQV5jx2zp2lAjAsnbY6veuBnZy3shYxrshfYfIEDC4z77oPnpLyGxLRKVL8fACSu/xXQJw0zXrBUulxi/13A/Y3Tu5Hs88TuS93iyGGwPifKE7E+Ulsa04Vzvu1UsOKfXIBVhFHYcyqBph8ynq8dEg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:07 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:07 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 05/10] selftests: Introduce Makefile variable to list shared bash scripts Date: Fri, 22 Dec 2023 08:58:31 -0500 Message-ID: <20231222135836.992841-6-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR01CA0112.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:1::12) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: 56414ccb-7f42-4156-6f01-08dc02f64de2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jIYEVdtArCcga++GIPjGSB11o4YbSd+JoRdFRpTOFa48A29rKz38lkJ/5Nk+fGCGj+lB35aPdQAA+gmwWI+HzK1i1/0X9AX51hsAFktzVFWWoHDrVxEYfkXhftD/TXlsbO+2w1b40Q9cTVScmhhxSAxgFgl46zrwI00Uz1BDRDG+YpyZ2lynZcvp1NH2vMQEG9RBH0Uwa0I71VVlQEf8G83Naybq0Z1kULoR2WP5d/G54OJfMOu9+djeILj3KrVpJg3I14JwKplODR9+2BSZFPcXqb9NJybvgcCPX3IVZal7OWaxZfAYUql9yAknnqTE/hKaqWUzAstTTbgn1+4FLreDYyPU/h8KYkC5cMZVVclqH2NiFvJTPq50tX/y/HC0qAp1/ICilc96F7W0blXxAywaZrxpOhjEhmcBRBhZhBYwIiekrHx4CbNHuvqTZQy5+/2JjKWMtneUUoAsnLGzzhwZwdA6acfn0ExdchJODZKI0Osu3PKWkOoCVH612YBnlnHRTKa9GozRWtatmzr2BjMBpxFXWicj6kIW0gKdPIbMgWlTf8bq4QxlSUsoCu3e X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7+ssfkBi4+EyqDBuK5h4EpHK5HB3waJrrOQikoeU45KEOcL4+/ieWGLZAI2rC6zs3MB2Tpuv7n2KAQaewTW/mskCKhD0x8jis/aVI6fKQjygPqrd3/E0hUCrwqz6tgclXkDznRKhlKZTSnqxtSWfeUfloXHohXiBlLDw9DU04ZpJCtcOjA64T48DQ3HJEikF6UJsygy+H/X5hkSYHw+PcFd6aYtJ4RdNDnND/ty0OeJZb9NbOTHBgzn0UUoj2T6ih2SLWb1hYlI6bwuNvPgt1TitQvuVJ93tG/bXLyWCz7iNKJaTpbUenWFQ9m8VH2KCfLthB57otnLIHlRMZmv3KH+6Ao2N5OKqVZRa+MGeaaWGy9XFnN0uqYTCE67P/7JmuXnnEN/l+VPqFFot70VL5MmiLdV7A9ZriL6qQ/tGV6vgcXpTO0zMF9SFsdv5KjBNpdS+7kbYpdi3PoKaq+po5hDXIDGo0crt8lw+KUct5u3lsW90aSucOC3cKB8e1u0Ll1PhA6Hs/WOChVib54lyWjo0XrOIAnFJ4tbGg0SUS4E4vlulHmzXXiMbOCCnQEfRexiElldPsEbpQaDPjE1o6Qkt1eKQseXg3Lb4+f2b3SzqiHi0v2Bla9h5ozj4Mv5On/Wp3vN3lI40IRU9MwNuoR+tRFrun8evf5Ah/T2VJclugvhWvImZZCuku+SQ6vWRze8rGFLU2zo/J+irmj/okxfGl3oBn9B73CTayPNAwMuMhkjKn/4ziGem///vyPshiahOemmFfEw1KGvmb4q/WQO0ApyarvtR2UNPUpjte8MyxnwxYl4cGYNS8WisVmk4hcQHHQECZIqAteUyljUNCl2cZL41vOtkeBm3l8Gg3YK9ykV1r3bme8spfGkTrlTERClk3ZmDn0L8ArjS+fLN/tm8rdFljW/FVyX65yehSLRT61IEeu5K0AJbqMyUm8c52CFaPCjkVIgtl5NHbH3Czayn/sf1rpmNvIgROVcmE4rg0m/gLpFhHg+Qt+FGctAwxXWMAC1EAapSjevsk2iMVkrVcYiq2cWhXFIoSfR6byoBX3OZexBXXTe4BPLwTJDpl/4xaDUM25A4A6Smn37iPJyuYz0h9B/WgLlTv4v4SNilq9H0azAcge6REgPjnZXEzXj4pacq9bWv2oBRfsn2jY9hq7Zd6Pe0QADL+2QwglquQd1H4XiuBoRVMQHlFSqBiDH9rOWTe+MDrhjisO8kYwOGPWFeMQcanVXLT6DHgLfP079H087+KYPJ7ZAfBUb8skUOsc70WEzl65M+Xp8MbyswwEjqHwY/MzcMoj3sF/PMR1cAkjw/FOxRxvGMdjoys7w56CT1ww8oHAkZ+Ax0+QEBxP2qxXjPMHwdD6y/ifyglZFq8yaZrFyA5zAx+4iEzLXqBazJgFYVqdYnswMP8fDtj1MfDBrEpqMZ9SADJVDAsMm7NwovhP0r9SzVzPpD7HFItE6oEJsjmsM2V0pgQsim3aIxJVVfx7zt3cfars9p+IgHmYSnCVtBNtfB3c/fJbwl1N6aDpCOdz8aeXK1GA87BBMhIIUHGbgpi9D1EjroSxf3r8kdAUUPoVUEFu2P X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56414ccb-7f42-4156-6f01-08dc02f64de2 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:07.3188 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A38VMOcKbmXGFnmJT6SiJZREpRgcwFVskk3bttx20H7Uj6G+jV63HXArskguhIOXyCw9TuW/MRVkTFx7n8bAbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Some tests written in bash source other files in a parent directory. For example, drivers/net/bonding/dev_addr_lists.sh sources net/forwarding/lib.sh. If a subset of tests is exported and run outside the source tree (for example by using `make -C tools/testing/selftests gen_tar TARGETS="drivers/net/bonding"`), these other files must be made available as well. Commit ae108c48b5d2 ("selftests: net: Fix cross-tree inclusion of scripts") addressed this problem by symlinking and copying the sourced files but this only works for direct dependencies. Commit 25ae948b4478 ("selftests/net: add lib.sh") changed net/forwarding/lib.sh to source net/lib.sh. As a result, that latter file must be included as well when the former is exported. This is not handled currently. Therefore, add a mechanism to list dependent files in a new Makefile variable and export them. This allows sourcing those files using the same expression whether tests are run in-tree or exported. Dependencies are not resolved recursively so transitive dependencies must be listed in TEST_INCLUDES. For example, net/forwarding/lib.sh sources net/lib.sh; so a script that sources net/forwarding/lib.sh from a parent directory must list: TEST_INCLUDES := \ net/forwarding/lib.sh \ net/lib.sh Signed-off-by: Benjamin Poirier --- Documentation/dev-tools/kselftest.rst | 6 ++++++ tools/testing/selftests/Makefile | 7 ++++++- tools/testing/selftests/lib.mk | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index ab376b316c36..8b79843ca514 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -255,9 +255,15 @@ Contributing new tests (details) TEST_PROGS_EXTENDED, TEST_GEN_PROGS_EXTENDED mean it is the executable which is not tested by default. + TEST_FILES, TEST_GEN_FILES mean it is the file which is used by test. + TEST_INCLUDES lists files which are not in the current directory or one of + its descendants but which should be included when exporting or installing + the tests. The files are listed with a path relative to + tools/testing/selftests/. + * First use the headers inside the kernel source and/or git repo, and then the system headers. Headers for the kernel release as opposed to headers installed by the distro on the system should be the primary focus to be able diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 81f094e7f0f7..3f494a31b479 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -188,6 +188,8 @@ run_tests: all @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \ + SRC_PATH=$(shell pwd) \ + OBJ_PATH=$(BUILD) \ O=$(abs_objtree); \ done; @@ -238,7 +240,10 @@ ifdef INSTALL_PATH @ret=1; \ for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install \ + $(MAKE) install OUTPUT=$$BUILD_TARGET -C $$TARGET \ + INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \ + SRC_PATH=$(shell pwd) \ + OBJ_PATH=$(INSTALL_PATH) \ O=$(abs_objtree) \ $(if $(FORCE_TARGETS),|| exit); \ ret=$$((ret * $$?)); \ diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index aa646e0661f3..2b6c2be4f356 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -74,6 +74,9 @@ ifdef building_out_of_srctree @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ rsync -aq --copy-unsafe-links $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \ fi + $(if $(TEST_INCLUDES), \ + cd $(SRC_PATH) && rsync -aR $(TEST_INCLUDES) $(OBJ_PATH)/ \ + ) @if [ "X$(TEST_PROGS)" != "X" ]; then \ $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) \ $(addprefix $(OUTPUT)/,$(TEST_PROGS))) ; \ @@ -103,6 +106,9 @@ endef install: all ifdef INSTALL_PATH $(INSTALL_RULE) + $(if $(TEST_INCLUDES), \ + cd $(SRC_PATH) && rsync -aR $(TEST_INCLUDES) $(OBJ_PATH)/ \ + ) else $(error Error: set INSTALL_PATH to use install) endif From patchwork Fri Dec 22 13:58:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503361 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) (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 B616C20320 for ; Fri, 22 Dec 2023 14:00:10 +0000 (UTC) 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="OENRXMNR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SNCae9XunNYVE4iO2+hI99EPmCVFffK/DCl7UBr9156AulMei0DrUnGoyrKCxMzQ9BMk61OGiXwhUSQmEJC7deKnYUH71M9z7ApckW3BonMkIZQxZ0zuutD227fASCEFjph71caRajHDCZsDwsnqFoQ+ulGTuv9fe3Dts6GlmD+BWrKS0X9+/+xize2usGmWgr7f0oslOYTraCkx4xxUNpQZFe1cGisUK3MIAWIvdkKr8yU/6Jf0watbYTLSCFBPoVSN9Ij9/Kld+LR7TcS6tEno/UahmC/v7J7+3xPP+gZQ5iiXSnTyxlg4YLJEFAJYOzBr4yitQnmpymKEynMUMg== 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=UMu214ubRKVCLvQtCJR5uPgmwck/cVIJS3EEqViRICA=; b=Z7CpT9k3Phntmi4yftwQ2Jo5ArWZ+HK6Ri+ZJkjT7eLPAe4nRLpx8xP8byrJvCGxP0mM5H3z9cLQuydgA3CJB/GovSypDh30WGAL7d4wHTRRnkv9Xg0aPi5F8MQHifxbcYk1P3dBRtExpvrbgi6SWGYwwzjxLhPBvdyhS+xwaEq8+I3VcpWtJGyttVSA6btxdNaCguUS5Zi8rGainRp7Bl4Jo01QI2PQXPr56cCkyQaZPr5tzSCSY+qv/f85oM+XhZ5bAK62Xuqxiw5baz2LqIeHouZN5iqHHBG7nU6KPM2uuNPWLdHr10PIGaVelnwX6Ly7gizVQNKLd2+z7RJUAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=UMu214ubRKVCLvQtCJR5uPgmwck/cVIJS3EEqViRICA=; b=OENRXMNRFQqcI4rhwm12SHnYSl+SJikhm34vclIkYoHO5UefMVcLF5RzmdabOGjodIRPxCe9oNphEQlprEq2tsCxmxTNGph35JK572fOoWfETSJaxoRr0z6CceIdhCkhdfth7UbKSzYdgEGR6PX9T6cf7Ke2HAKGJCZm0g6lCN4OJjzMzQWzV7LKrBrFMNbGa6ah84rqr+FTU9d9Wkp3YVLgiEAvdG5d+OjY8jikgjoAk8ekRjHppXRNwoBdx4O0mFamli2ZaZ2Ks+n1sl4QF29u6eDl/ATQmjmEI+LfAmmDwnZxOQGv3pejLK53l4pvru+JHXFwQar6VAxNg7e2yQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by SJ2PR12MB8955.namprd12.prod.outlook.com (2603:10b6:a03:542::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:08 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:08 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 06/10] selftests: forwarding: Add net/lib.sh to TEST_INCLUDES Date: Fri, 22 Dec 2023 08:58:32 -0500 Message-ID: <20231222135836.992841-7-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0185.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:f::28) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|SJ2PR12MB8955:EE_ X-MS-Office365-Filtering-Correlation-Id: 3fe2910b-b134-4c6c-c4c1-08dc02f64ebd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vJmufmTUT8tOGPuFi48mNncAA0lfBr+imwNVOwtPy46jsGt34IMh1lLJCiRVFMEWL2Qndz8W8jawoiXsOoqf0dLFYSCN0IxNuwSeV6Qs+qkiC9l9zMRyJUpQgW8hdtu1rz0fLKE01dZeYNMk3vxdbAmum4wiL0C4OBeXyV9BFWuoID3gbkkjmlrUXfySisce54Shx1ZlmZERAPt/1LOBdML6E1r4ld1dEav7fG22L/AxmRKSpfFMohZBEZP5kl9rqdmo/nN2hIBmD/PYfuy3DjW3Kk4dogfizhIzpAeaIoY5VqyBVVyVC/6WEtHJZ8OBGmvmzAx4KamKhzYcYZm/Lo7rNwj+WPStS6xpA/x8fe7S7VMMo7rEzdddpD3EvPvSSWOnBt5iC0Dm/r+bjH+9DebuPfl6ZKgt6HPqcB7DBeflWYo+/LucTv9A8XJYbmjydXvl8eBb3cTitRqvJwsvbOQxMQh8Z3xQ1HNs0bsWE2koTgAAHLi2safZP/tNl2Rr2c8n+g9rVx2Ukg8cdTIrxbGTqn9ozafIzGeLOvaxhcNIebnrXWTgRaeFcScZqWlT X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(39860400002)(366004)(136003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(478600001)(6486002)(38100700002)(4326008)(5660300002)(6916009)(54906003)(8676002)(316002)(66476007)(66556008)(66946007)(8936002)(1076003)(26005)(83380400001)(2616005)(6666004)(6506007)(6512007)(36756003)(41300700001)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LdjZEX/fZvHRYoVme27MqEqfwEq8zMzUxOlF3sqPWAZzjldip3YLvUY0frIeKAOTqFeSpUlV6hUVXItN4B5XHvIUS1//ZePrY3T6QtNPcLYuvk7xPoKgYi32zXoLnkmIiaC1iRVzEWc2YopgZ7J3dFLh0cWCWCv0Cl4AcXmC1FgVE6OtjdTySXIbpbiDQNcBKZU8QlPCXm88we0atysQxpQhyDMVimtInhrBvaJHijsl0Q1lAMLyUfypdZsAbBOFuXtipxGBVWIpp8RWQjKUk/y841W0KeBRr7zz7TbwFYrYyz1jpEF2bCoVodD21SUNjC9056jHMQc1CVtn2+h6J5F81xPRZzYS6DPGbPl+/jOp4S+C9Q45VKCzbQNqMXoPZ+DV5zTfl1rnv4TBqkW3uobayUSFbQUNA05CS3sdWBHizQnEbcKzPFbdfmfBgG3xKiQYwAfwaaBXiNFDNKOIKs5LT4uj00Z5wd1lOtBab+FKtX/VY++1cyZDq5a6tWaQAeWQlWXoI2IGDFujmvPa9n77hIw5m+Vr6fWGbjvzgJkuXN1QJB8yV2c2cQydl4g+J27VKQNxf+xNOhK/niZasnE4DyypiU6Mx6HOb0HqS22mJP8RNE1QNpfdSVluPrjaWgzjDfkcZoCE2g1SjRH/gSw4E7dmxtFSjTfil5LTAEPVjNAQKJY0AcYJcPS7zJIW92lxn1J5KOkQ+ZHDufbVHG7m7Sr0Z56ZnoTW3Cc86w4jZppVvgflsy5aJpyRIjbx/cpYqmEg4skqTmkJAJ3jdjlKNXQHmwsTMbFWnXUAvUIJDONa30znp87WLSuSaRF1GqRyNxkc7ry6SrUvxJXYKzoW/S9ts7ttEpuQz24c0IJqOrUyk62h9Bfl0B+o0azx1DuuJxkxvwqdXf97C+nGXry6q51wAY3zM2GbhvO42I28+9T+7JgMfUQ1IyycVRlPstYX8+s51K7P9pqPFs6VQYaakw0/5yvWPVEOSQTr6q0Jpsd+0bQ2oPgfSxgoPA7s0EwrLGqy0ZIfB3nHklXioI+FmyIKPn4apxrt5rovcnMqFaZVCDvMmozwuZ4ksXyXzXcSg/Nw4KwnKeZvjSMunB7PG22yczE20TvAASZVJw6egPDUbjs+WrPZaO9PfG3KXzKWndL8nq9Xk/lV+OMnFNs8sn+MrzxAZG4gt+VazMyw0fK+xurIaSZJFOkvuQbhcZYgLEZ2xiOYnrW5XQ0GRb8TA8h2cvEfLJ4c0brYumOj2vLzM6qTswmZgiH8QQbtKxaPEnVBi7kYzHPPVFLS6k6X30WsKCbl2WL3P9SZ7IIaGXb3YjAf24uTC16sq+Yb0IjjSzTI3uCtBpS2uBnXLnV+4Xa3rIUbweNRhkDb0cf9HFeXXGwdW0PSa56k3qYLtABJx2GHI4EWaDpyjhlNKOqbH4iux3Gao227wxtr12eWfPcxpdeOKNhYs1epfLai4Mp/pIvBXs5jH/Nn4KCXGe9RbukT9DXbWFcyASnjcX84/6LzuzZLV3nshz4QHzo2TyXp6ZssYsDYFhBE0ADYmo0GOcioLJCnKLxaungqD9FzF63rjMykzNP6eNazoxTO X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe2910b-b134-4c6c-c4c1-08dc02f64ebd X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:08.7682 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WBkcciW+7czE31ROv2wJhnCXE/ncl1tyFYmbdb/XyPlrBUWQf2rRPnVSlhpkc4PvbGStdqdKQAtr44RsTjswzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8955 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Since commit 25ae948b4478 ("selftests/net: add lib.sh"), when exporting the forwarding tests and running them, the tests that import net/forwarding/lib.sh fail to import net/lib.sh. This is especially a problem for the tests that use functions from net/lib.sh, like pedit_ip.sh: $ make install TARGETS="drivers/net/forwarding" $ cd kselftest_install/net/forwarding $ ./pedit_ip.sh veth{0..3} lib.sh: line 38: /src/linux/tools/testing/selftests/kselftest_install/net/forwarding/../lib.sh: No such file or directory TEST: ping [ OK ] TEST: ping6 [ OK ] ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip src set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip src set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip dst set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip dst set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip6 src set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip6 src set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip6 dst set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip6 dst set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . In order for net/lib.sh to be exported along with forwarding tests, add net/lib.sh to TEST_INCLUDES. This is the result after this commit: $ ./pedit_ip.sh veth{0..3} TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: dev veth1 ingress pedit ip src set 198.51.100.1 [ OK ] TEST: dev veth2 egress pedit ip src set 198.51.100.1 [ OK ] TEST: dev veth1 ingress pedit ip dst set 198.51.100.1 [ OK ] TEST: dev veth2 egress pedit ip dst set 198.51.100.1 [ OK ] TEST: dev veth1 ingress pedit ip6 src set 2001:db8:2::1 [ OK ] TEST: dev veth2 egress pedit ip6 src set 2001:db8:2::1 [ OK ] TEST: dev veth1 ingress pedit ip6 dst set 2001:db8:2::1 [ OK ] TEST: dev veth2 egress pedit ip6 dst set 2001:db8:2::1 [ OK ] Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Signed-off-by: Benjamin Poirier --- tools/testing/selftests/net/forwarding/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/Makefile b/tools/testing/selftests/net/forwarding/Makefile index 452693514be4..5b55c0467eed 100644 --- a/tools/testing/selftests/net/forwarding/Makefile +++ b/tools/testing/selftests/net/forwarding/Makefile @@ -129,4 +129,7 @@ TEST_PROGS_EXTENDED := devlink_lib.sh \ sch_tbf_etsprio.sh \ tc_common.sh +TEST_INCLUDES := \ + net/lib.sh + include ../../lib.mk From patchwork Fri Dec 22 13:58:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503363 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) (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 007281B271 for ; Fri, 22 Dec 2023 14:00:16 +0000 (UTC) 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="OzbqP/s0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GLKvEQw23Hw1NIzQmQ4QkB+sI4LBT+BS0SJ0AggEI2HVpJR+vdKD9Zxsd+E2y2PT8FtMav9Inq8hLbcH8DsmO4YBUd8tex1neL5BPppdZK0f+vAStN5NdU6JD7n7yHmZA9vlSlQOh1D06U0YMo8vv5yx69Od3Ya87/LXWlbiYjjLmhz2+aae1QUrNF3ciSOWuQ2r93l0ZIC7cRw8amlcDDRzQ0AiE0aa95syzpiltmtw0qpkVx2GimLXZNecBkPgetn+kKxAeskjFf5wjptW1QVe5//UcsR3hL4vlbNrgHdynjkM/rQWpBTAs24+otnyd+kH3zAgaJ5sgl+TGLmC0A== 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=C+62msIBJqE5kARCTjcNURfn7oWX2jJ7B0KpKQ2XVrY=; b=SlrnHTmWujIOQvwZKShRcTyCz3ULHZtWIWbuaSU6jDpVj/MI7Rk48zFEswuyYAyRaYdIw/vYJ+LkCYDRyYWeQXRNC26hP701nKqPaC5dY6F+tx+bVWTiK+KrkfZcSNGrg1fg7pfV7Fq17HdP0Im88fIYLNkvy1N3kKaHo8CBrjh23yAvM5+5KQm6KpNyDLqZlRq0Ld36gyDFzb/pGQgT+kQEe5OU5PUr3+KRT3GGVfAZlwumSi5V9h15L69iSPLlxO3LSVJxYZHDmIu/eNIrdVTrMh82h/pu4yObOKnby5MZFd0vA4S8xGGDRPBCxSNesiTofTxFmZERpB+iZ7CsHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=C+62msIBJqE5kARCTjcNURfn7oWX2jJ7B0KpKQ2XVrY=; b=OzbqP/s0A69NPMBipoNCyldLT6iGZZrI1mSwmQD3WEEsfo0Jb3IwGpSjMZ6bo0tGOf4vQBs+8XX/dX5P4K7TqOo5is6ed0xx76NMARYSsk+dULXrmfvrecvYm6jo3v394q7GQYIM2xJL1bWOHhKDem4L7q+9MO4BXHLXLzTBUO6lrzvm3Cl6238cXobA8r6w4hFvL1BPhHdmkYtZQckv6aF1ncudbbRyPx9642kjBCcDLoK2SeQ5gqEzDnfbG8TSPnMBICvt1Zd/AbEfm2ZcpN7ekNO0w272fcSogBTg8LoDllN1vSfNeJRTcY8nOgCrd65cFsL2FDZ52PX87DMjRg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by BL0PR12MB4849.namprd12.prod.outlook.com (2603:10b6:208:1c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:11 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:10 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 07/10] selftests: bonding: Add lib.sh scripts to TEST_INCLUDES Date: Fri, 22 Dec 2023 08:58:33 -0500 Message-ID: <20231222135836.992841-8-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0273.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:68::22) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|BL0PR12MB4849:EE_ X-MS-Office365-Filtering-Correlation-Id: ce1d9af8-9c0d-45b8-caf2-08dc02f65006 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3+l1PaM+rtsREh7rF9/qGNvaqSd5ee7TImZ74TZdmTiK+T3dEXG90tQLHs2uxBq359Y+jQcIFjCWXUk+9+ML0UiWH7iiFpOTjLdKelEH7zMWEV4cTbGCytrxvxfIVsH+p5xVl1Fd6urWyaZePKMgGoO0Xrq95zGxbYTIrOoErtIsr8cHJv0EH8qQVF/X4h43supY9Z+kZcsbKVkQiY8RiTdrMMGpK7Hb+7yRjDu5NTS2/CKuhY6Cw2qLisrfZ5LlPFGEuOtMb2A3RoeoPdfWI7wiVK4Vo6KkPJ8q1cyzjH9IL0QEn1beCRkZhxK2N/eOm9EstQpuas/9XAj+H860pHpzSZnLQMyDIn+by6obQhTnx3z5HFhgWMo9fjhjzzJtLnI8mzrR0MbOeOs9c7EhUweKWugJqp9t+/2SiHEVeO+PE0+CG7bhBUikmdHUBKCAqOpa8P2WRprkEJzXtU3xMNO+4Cko+AX0lDdIyoJvpyy7eOZq0V98tWQhsqpD/taIicu+0sxmixwbfJsnla1CIXYM4OgjzB57ThtpFshHq1INaApIIjvEwa9Ufh+5TzLg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(366004)(346002)(39850400004)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8936002)(8676002)(4326008)(2906002)(5660300002)(478600001)(6506007)(6666004)(6512007)(316002)(66946007)(6916009)(54906003)(66476007)(66556008)(6486002)(41300700001)(38100700002)(83380400001)(36756003)(26005)(2616005)(1076003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PvGWO3h71iyCBa0nzELXlpzpcbD+Gqpg+ZIDdeP9NSHjrR7Nub/a9llFeehC72Jcfic8xO1RTRHQ1Fva6g6fAs1zA87eqD8B9enQofUloO5XCl3fyKCj/heiSa1TP3jfNTNPzj7cH0cV9ohk4meS+hYgFuo2o661hX3QrjvdR+cTBZzr2CzB0oerHeEyAtsY3HS/TeBimW02N/bRBxyEQOH29jhVLZaKCbMty77OLC9tKFSTM79qiT8KFmjYWAfXz8PYILnhDlXt0F33wvJpWfbxvyxWGPTz06HlF5cHoae1/lzI5tF0M3U3rBrrZRFYzUSwy48u1SLowDlPvBih5I5yMTd8iGxSjh4eMmfGXvJ/1gQN2L1aueXsi2opxKhwi/CG/QVhiPG2QhlIJtCO6FLY+p3dkWMt1dqZ8S2HikX3USAZncPjTzKIAgV8V9hWiWnvlJsdlBvF2Y7KcOxkTSoN5txcmkN94NbHeUPUIfMsmkbskXYQeoUez0yA+/2OT5D/dti6QAGyTBl1g/aJ5/Yl2RNrhfIWm1WI6yqBVo0/6rcQzrIj6A5xYWDZpUYt1Kg/Ce0vTpDUa4UeLdDGj0x9uCAkP0eyN5Q5JEu990SjI95Bvc6wcZgnhCAfaUbiGtabbtXPMhsEJ5BnGKGRve3hc9TEL1EYjm+2aMKlSNuurl7aARBRuseqY/r4vDK8PYhAl3JBxbtvUwDSQWw5szNRtZYWnUGGAzCowXpLl+rELw+fBczo1bERDDJL3eZ93/dCPVQKkOw9FKU40pSWlXtZeVC8MM7Bjg0vWmsFrpAb0yxrgEeAGZH4wnbmp1oj+pv09XNYaLyJl/FB3Lj9AeXVCjQtNpyRs+ZiG4uo/yB6V2RhiT9gCmsmKFqKLzNqepk6weTa0elBql+EZE/GLzQHRo0wOWI7HzLAbH8Mef4h4ptG4SFOKE9VG8rHMnwk/vUdoxLaSBwdPD//t8J6R/UXyFsIBRQiMvpFak/fRejLlLdnW7Z440EdbQ2k+yt5VlfBJ5K3G1GPHfWmKTw9sKj+AvDw3gg8aY9NhpdIQ93Udkjc4uSOIktHQXaOp/O60AESBuVRl91IWnNV3ZUMJnmPR5nDwJd1LBLMkYTTUq4FHkheBaU8ECRCenDiYnZ3UNeRimdGEJ9JG4uYoG7H2P9UAe3yQvNRktHvI4NfBSZPoex8mzLik02k+6SilhOHYnEu+gYQxM+8HML0FUDsodHNkd+YPyRgaR+zgUynRfkOwy6l6Wmrj7D3fa1jrQh3dGs+Bv7wXJ/WLzDE/ASJxaDvnI0AAzG7l/vR0b1H2t8gqUEAMD+ajeBVfaK+LMmY+cj54dlHZdjQs8vAH0oaUOYTEG6LCUHHn1rmTK3YxOzHbVHP9c8hib+Efa5SFooIoBZFRGQ1KnWkTsm/A8f2kEenOQYFNWmanPBOmZDbPLpU8MBTqO8MEOyhiTrIY+WI5tLyWlYbbWRS5O5xMbiIcy4XIE0rL48rrMUl8Zc7/3wYd/g4BZtOePqQOtKRmToU0Kkx6hbcjYz6COoH2pCgVV12sqaW9H93YmE8nY8+o7Lrz7ayNXkQlltbx5a/OIP4 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce1d9af8-9c0d-45b8-caf2-08dc02f65006 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:10.8951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6CUEmrA7gnAiFCJNvdqCZHw4WGQq1AGPKHMInDD2nAFYKbFEWEX4fZBDoUa06R9BSQNEW973K8dNILFDKwk5PQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4849 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Since commit 25ae948b4478 ("selftests/net: add lib.sh"), when exporting the bonding tests and running them, the tests that import net/forwarding/lib.sh fail to import net/lib.sh. This prints an error message but since the bonding tests do not use functions from net/lib.sh, this does not affect the test results. Example: kselftest_install# ./run_kselftest.sh -t drivers/net/bonding:dev_addr_lists.sh TAP version 13 1..1 # timeout set to 120 # selftests: drivers/net/bonding: dev_addr_lists.sh # ./net_forwarding_lib.sh: line 38: /src/linux/tools/testing/selftests/kselftest_install/drivers/net/bonding/../lib.sh: No such file or directory # TEST: bonding cleanup mode active-backup [ OK ] # TEST: bonding cleanup mode 802.3ad [ OK ] # TEST: bonding LACPDU multicast address to slave (from bond down) [ OK ] # TEST: bonding LACPDU multicast address to slave (from bond up) [ OK ] ok 1 selftests: drivers/net/bonding: dev_addr_lists.sh In order to avoid the error message, net/forwarding/lib.sh is exported and included via its relative path and net/lib.sh is also exported. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Signed-off-by: Benjamin Poirier --- tools/testing/selftests/drivers/net/bonding/Makefile | 7 +++++-- .../selftests/drivers/net/bonding/bond-eth-type-change.sh | 2 +- .../selftests/drivers/net/bonding/bond_topo_2d1c.sh | 2 +- .../selftests/drivers/net/bonding/dev_addr_lists.sh | 2 +- .../drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- .../selftests/drivers/net/bonding/net_forwarding_lib.sh | 1 - 7 files changed, 10 insertions(+), 8 deletions(-) delete mode 120000 tools/testing/selftests/drivers/net/bonding/net_forwarding_lib.sh diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile index 8a72bb7de70f..a61fe339b9be 100644 --- a/tools/testing/selftests/drivers/net/bonding/Makefile +++ b/tools/testing/selftests/drivers/net/bonding/Makefile @@ -15,7 +15,10 @@ TEST_PROGS := \ TEST_FILES := \ lag_lib.sh \ bond_topo_2d1c.sh \ - bond_topo_3d1c.sh \ - net_forwarding_lib.sh + bond_topo_3d1c.sh + +TEST_INCLUDES := \ + net/forwarding/lib.sh \ + net/lib.sh include ../../../lib.mk diff --git a/tools/testing/selftests/drivers/net/bonding/bond-eth-type-change.sh b/tools/testing/selftests/drivers/net/bonding/bond-eth-type-change.sh index 862e947e17c7..8293dbc7c18f 100755 --- a/tools/testing/selftests/drivers/net/bonding/bond-eth-type-change.sh +++ b/tools/testing/selftests/drivers/net/bonding/bond-eth-type-change.sh @@ -11,7 +11,7 @@ ALL_TESTS=" REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh bond_check_flags() { diff --git a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh index a509ef949dcf..0eb7edfb584c 100644 --- a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh +++ b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh @@ -28,7 +28,7 @@ REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source ${lib_dir}/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh s_ns="s-$(mktemp -u XXXXXX)" c_ns="c-$(mktemp -u XXXXXX)" diff --git a/tools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh b/tools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh index 5cfe7d8ebc25..e6fa24eded5b 100755 --- a/tools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh +++ b/tools/testing/selftests/drivers/net/bonding/dev_addr_lists.sh @@ -14,7 +14,7 @@ ALL_TESTS=" REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/lag_lib.sh diff --git a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh index b76bf5030952..9d26ab4cad0b 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh @@ -23,7 +23,7 @@ REQUIRE_MZ=no REQUIRE_JQ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/lag_lib.sh cleanup() diff --git a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh index 8c2619002147..2d275b3e47dd 100755 --- a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh +++ b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh @@ -23,7 +23,7 @@ REQUIRE_MZ=no REQUIRE_JQ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/lag_lib.sh cleanup() diff --git a/tools/testing/selftests/drivers/net/bonding/net_forwarding_lib.sh b/tools/testing/selftests/drivers/net/bonding/net_forwarding_lib.sh deleted file mode 120000 index 39c96828c5ef..000000000000 --- a/tools/testing/selftests/drivers/net/bonding/net_forwarding_lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../../net/forwarding/lib.sh \ No newline at end of file From patchwork Fri Dec 22 13:58:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503362 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) (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 462A81A703 for ; Fri, 22 Dec 2023 14:00:15 +0000 (UTC) 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="Zn2LhT6/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f64q0ux5BzYyLB3Kboxx6acaH/deRp2hMz6pRmbGvvsTOXAQZF9BxTbsFLMO76f9UV+jiFHiLB+ibBqsnj5Zo2QL2OnNxi21iZPqkrWosSARHoXh8L4G2sb3xug0FlkXBL5qd/Zpk+I2h5ptOJFRdzJpMrP5q1V+/L7p31Wjp1DyOGQWZ7xEXp1ykTMaKikxOghbjiabA3nZ8VTABg0G93FOeHsTnDGYZSaUd75bsuT9BPW2Ns+ZXcCDdLRjBu1wFiKIJNneC+btSw+tMMstbmJE2h8AcDJ16051/m4pAzOaVJ25ZHBQqtZ1eba8LCpcZGGKSr9nBVmbAvzHVNOx4A== 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=1Z2B9Xb7kRzD5tXxv3uFoBvjw6KNB0u8HK4zrWlosf4=; b=gmMed/tnGW00gChPPyCxVomlYBC/fEp5FdGrG+udxgZMZ0rca3H6BsGhm6m64fIm3dE7XDmlHmhe/FZVbEGZ/ABt7VvqvV34jojbiiwrY/ZNI/pqkr0vH8h9paCdWLVlu8X3Wz+Q98mHyhwadhhqGwuOIB/hlhlwAUKRt7de0YH5j+auBWwYTh1dL2KQnMUT4CNX3y3NOlsrvaR3LmW9gfLPxQusbP0Io9noZ5fUThEXqxDLZ2HX1zDmte+av/3HrOQQW97PRG2eVnp9C4dIkYvh1Jl646LERkVcH7YadpWfHS3osg5H5Nvya4TSAYNrQbwxCuyZxm/JlxbzwKURpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=1Z2B9Xb7kRzD5tXxv3uFoBvjw6KNB0u8HK4zrWlosf4=; b=Zn2LhT6/MJHkS54wsUP7U4z1xF3FTCxiz8ODdzd8mXOftfKQfK+DoJ+NplVLO+aTF90vlbrT+IhV2Yqjcl/OQ8DKJPPvMW+gcHlxqhzGaolRsH/SSp3enLi+26D2A4TtQ1iyS8JbXKl11fioU4wnBvIdZ79XBhLLLP0PnpjsJDvq/BtU8GutiHefFD52XtD6j+vrikt+elzTEp9MMRcqonnbNNb7LTD8v6i2W9IivASjGihSQvwSOPMh9iGHHkDOW+jihIt3lUAmFHXpaSkoAp0e/NwZVZFim9avT3uVQLv+1H+faiLq05c4IUVactgTqKKl6x4BjPEXWTkBBATlVg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by BL0PR12MB4849.namprd12.prod.outlook.com (2603:10b6:208:1c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:12 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:12 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 08/10] selftests: team: Add lib.sh scripts to TEST_INCLUDES Date: Fri, 22 Dec 2023 08:58:34 -0500 Message-ID: <20231222135836.992841-9-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0265.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:68::9) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|BL0PR12MB4849:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fb7ffbb-3df5-4930-e662-08dc02f65124 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m14hK6Dx153l+z6dfJXBxJWcV3v8lsQpyZ1inutHIXwkzhJXYQtayFfF20xzESRvabnwsqlC4I7rLRB03TegX1/kvmb6XkjHh3HP8fMmjQHbekAeNYFfNYMIn01ZQbMEz87UrQXCBkPSdYZBOvjOGBGW4IkCf5wzSCOUGA3vcDuWTpijnubjEbFVR2nhyet4HkdGfoKbaT7pvdBdFiSU+7lImYMHwvSH4oO0XNNAOp9FEUNWgSCBNoIlyc+00tJLwdq3keePRDedPambgv23fzMMyqt+5ozQXCLejKOcfvU2rILPiBb+GKTyg4uKoOHsPlZa6VXUkEJ1NFcqwOFeIcgF8JFFcg2eSse2FZDXTfh4CR6mW3IYMrdfgHOtx8EPmoDuzxhdwvccQ1Jj1oXj283nD+OpWT6F8/V20GjqWXLHD3obGMlWRL9h6tbbEl3IwoB+kudSnzndWW2FBrNqm8fd9euL9Lk5PVDPGU5hU0y/RO0VqLY8f6jz9Be40xibWNXYuostkQORk/Ul3IFhfPkSye+gqh01Qa2XabYrnvVFbyuFbiRHAJYzKlEhEtRl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(366004)(346002)(39850400004)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8936002)(8676002)(4326008)(2906002)(5660300002)(478600001)(6506007)(6666004)(6512007)(316002)(66946007)(6916009)(54906003)(66476007)(66556008)(6486002)(41300700001)(38100700002)(83380400001)(36756003)(26005)(2616005)(1076003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AbSexFeUJVGNk1IAsn7aZ0TAdoF6OT1s9FnUdLKEVATX6rvnw7bFUObfwEJ7oAMMv9xk8d1CuPSaZkxhc1se1GFxvdxhGTTwAMmZHun3yYgCxwl0zx6ZoO6TAjyg5AUUvHnqhI9O8H2HJGjXqtJX+nfNlvQGdFCVdS5U24ra072t05L7fnQ0R73D9RNWKaw+sIr2fdVmo7KBiVBHT6P8ShF8Y2MbH2ntpXDUn1neorwre5sWWNlCULtO64tWj5CRRPHPNNnE+CNeXHMd+8LTQ/8tqO1CyULM8+z6AwzWiS5pyYSCI3Y0GD0BNvkLb0nhHcaMllv6Sn5VeQcsx+Z16xv82WFet7fG8yqw2TuTQo8xDzqtmlsz+x8JUXaNu+H8gVeWP0O1VAH10gx34Bb4wRISQLwe8JyFrK841eh1+OhTtS0Z4CcK9xz7x+3iUtS+lkdSV2++WrOp6TesIeTvQJROfr+M9xi7BVFBHUffz2riy9Mv1kVMCTB3JjtACO4M7Bk4S18zN+y9pUkSeFu0rSt/qN7iUUOgmGFMHaGMVZaZAM2GFWtLfWOSnTfjP3Lq8CZnVMqUwI//PSQ95CipFhrAE/zypdoynQP7ddtTATmKkLEzoR/Wfl7cz9RT41X1tv4wH0aCjh1YkjYCRmYjfNoc92NM4lrNw7TstDRhdVqaj1jhB3aW4LZvxETwaOxJ9iqV1MhsNBiC5H/NlQYyJDZqDAd1jH+skmL1yMUA7+xAAFLPNJ+lXNgYs9q/0OQZeX2RyBpTrMJoQ7m9dWBHmke7lr5R25EC+cw7gvoQx9jecrpujAjkLqp2GlGvMBhCMzINIp3pZ59R61JqlYsxIorc7LN+QluWSUyIMc+yOMpRmkzeIRJ7oqr5j1OWCS91gwr29UXmc1t8ZpzqLqbkUaOMOU382OapOfRJgCYC+aZ3OUuVPBTAwtdIIz0Ea8Rcjf3rotuQ5OtP6u8Zz7D4Wv5xZD6QCzOf0NkKfXpWsZ2/8lC7QK/w5HSwwG8ISSBdwly2MHpTyQIFT8T8fe1x3HfFTB3MohfaQwMjp+nHc5um5RPcsRmwkxphGwD4GBrtmbRZoCfEsCxqHni9rTE8SaC5Qgm/maS4OAuSA+EEpn+BDmOWaGpAFe+n18uH22WuIoAqetE7iIRmZkS1S/8QUYh1MHO2RGkRTCeZWzUAUWyflGwSzsbGTBSy1qxBqJK2izXpOhUdv5Ku7E8SNK8y1QNEHpwr+Z2dduvJqeF8qVCzzmSdSp2pyJh4rGqyb58Jk6V9rWmuLvBtWMiT+x0dF5FP6z0zP64tJvltL9DfffkW7ghVKd7NUlJNC0q6DXAD3oS3A1S5KkQrcJtAXkIyqt2OSjSQdJ6HiRA3v0Z9SGJD6yQiPwXl0zZUb9ONPD4GmWiTAu+/I4SP2ZSgTwSNl9J09t1fD+bfOqaXGKqtA420+LtU8sIS1Ya0US+rH8whJbGSOdss4I2U0UotQG9wSK4FKN6ErDJwfhd4ZlPoCgMsmBjlnBvmE/L+FOhEL6MUPxqGJz5ldas2+DL1baI+9k56wZ2IEPpfPb4xkzEjItKh5OdWlut1tA1IHFvULmSd X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fb7ffbb-3df5-4930-e662-08dc02f65124 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:12.7637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +fS3bZXCMU4TC6WbVtMj+hd6SJKSpUfMO+1SNilkbg7FqOtiWmLjKlyTnXy+DwRCFHhQfHGEwIWtU8Hl9HmksQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4849 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Since commit 25ae948b4478 ("selftests/net: add lib.sh"), when exporting the team test and running it, the test fails to import net/lib.sh. This prints an error message but since the test does not use functions from net/lib.sh, this does not affect the test result. Example: # make install TARGETS="drivers/net/team" # kselftest_install/run_kselftest.sh TAP version 13 1..1 # timeout set to 45 # selftests: drivers/net/team: dev_addr_lists.sh # ./net_forwarding_lib.sh: line 38: /src/linux/tools/testing/selftests/kselftest_install/drivers/net/team/../lib.sh: No such file or directory # This program is not intended to be run as root. # TEST: team cleanup mode lacp [ OK ] ok 1 selftests: drivers/net/team: dev_addr_lists.sh In order to avoid the error message, net/forwarding/lib.sh is exported and included via its relative path and net/lib.sh is also exported. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Signed-off-by: Benjamin Poirier --- tools/testing/selftests/drivers/net/team/Makefile | 5 ++++- tools/testing/selftests/drivers/net/team/dev_addr_lists.sh | 2 +- .../testing/selftests/drivers/net/team/net_forwarding_lib.sh | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) delete mode 120000 tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh diff --git a/tools/testing/selftests/drivers/net/team/Makefile b/tools/testing/selftests/drivers/net/team/Makefile index 6a86e61e8bfe..d31af127ca29 100644 --- a/tools/testing/selftests/drivers/net/team/Makefile +++ b/tools/testing/selftests/drivers/net/team/Makefile @@ -5,6 +5,9 @@ TEST_PROGS := dev_addr_lists.sh TEST_FILES := \ lag_lib.sh \ - net_forwarding_lib.sh + +TEST_INCLUDES := \ + net/forwarding/lib.sh \ + net/lib.sh include ../../../lib.mk diff --git a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh index 33913112d5ca..bea2565486f7 100755 --- a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh +++ b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh @@ -11,7 +11,7 @@ ALL_TESTS=" REQUIRE_MZ=no NUM_NETIFS=0 lib_dir=$(dirname "$0") -source "$lib_dir"/net_forwarding_lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/lag_lib.sh diff --git a/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh b/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh deleted file mode 120000 index 39c96828c5ef..000000000000 --- a/tools/testing/selftests/drivers/net/team/net_forwarding_lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../../net/forwarding/lib.sh \ No newline at end of file From patchwork Fri Dec 22 13:58:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503364 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) (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 C88EB210F2 for ; Fri, 22 Dec 2023 14:00:18 +0000 (UTC) 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="C1hhh+vx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bziW9QLIyXuyTVX889SCBcqALwHU8gZCmwaXvMlmjCBsxNR8QuQAEcq+MhdwjYVyduS1Xcgc90oyWdpj2onQQQwZDQ/OzWqUucOSe4utrX0tLdOmydvwNdD02oOiFb2sqcfLwKdrsOvSMgbX43AW9F6EG9K0l/20oIbZ81MQI1zhAIi0ROj7HwH9nZmD3L79bYLTftk9ddLjVvyupc0fxpZZn5txLHJk7AJeD9YB9yK6M75N1Q4Eb+n12tdQsAKzonIfWeJQ6I8cxx9E9rxYxT/Lb687KxjUXbZ5fBuDB1b/BCu9N53XsxN0Yaj2SV48UT2N1LBCaJMQ3CqSqs6Btg== 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=UONF/KyNhKsMBF81/OzMHIxa9GpzqMYgMnsHCBr4X1Y=; b=mctVvR/o5nxgW8k+knLPdMdu5qVXZH2nS5yMEMby67xMBa2EY91CQXz7JOlehTzdEavVWhMhrUoJC8GMQX1wYJ1tiqPtjMSbWP4m27pEM1ZLZ+aJzU9eLF6c5+6jSy172bJj0AAujyZfMfIKxmUvgb6NmS2XGEwyaLOGgIUkuy0XDjvLHnwtsn4i/e/9GdtTlYnLmAv9jwSNd8OOk+J4RfcYuXfrVr9a9Lsy+aZ782WVCwAe11j3nbCykmvDSURi068Q8ru23X2le+CdE8DXvCn5snPF1hA42S5dyLt1dxxWiOdP5CilBotSJG1CpcYmEBxv9Cp36cywOhbXHwUgfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=UONF/KyNhKsMBF81/OzMHIxa9GpzqMYgMnsHCBr4X1Y=; b=C1hhh+vxJwH5EZwsr8JC0A93BrIsUC29zbuHZSS1yZzCU5U7VoHdQlLE9GRaVyPZrjk2uMSg2aIBqO++8nfJYp1Lu3dFtGYPlDOx+bFU/pbzcKXvoatuSHeEtorDhDf4J2MbQDp6ynK7iwOMMnGcMu1JKyB1OQKO9wWW2KMdz2E+yeqTwPoZ3KujqFvDHOKg16iY9fLT1znFzCvA3ukKweNHa+MnrmZzvASxa1MkucKdCeYFpM3l1BqbyaEwpLBoAx/MLpA+TyKNpnjxbghqjhH9lH99/GylmIGscO+u4gLX/LP48fjuGcjt5iyJxcJ8D5sR8a8LYqn7HQH349ezVQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by BL0PR12MB4849.namprd12.prod.outlook.com (2603:10b6:208:1c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:14 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:14 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 09/10] selftests: team: Add shared library script to TEST_INCLUDES Date: Fri, 22 Dec 2023 08:58:35 -0500 Message-ID: <20231222135836.992841-10-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0282.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:68::18) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|BL0PR12MB4849:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f5bbd07-3d10-437c-3e5b-08dc02f6521f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fsd7xfo+34lXrsyQ+SquNcVyL1TxhCxqpIyOHGpGgMpf1imqx3fTDUxsFLfIot3KNqaxCJzaUvyrNw91YMYS6DowfUfNBse8+YGsF1RZzV8jDDyGDNo6fEGltPfCK+bb09etu38ANUpayXPD8bErL/pSE0i6edwfZ6fgjJ7uzMLhyvTjw8qvPmqe1+GT54W3AeWFtdqDf+dFZyReyXKydd5qRGLaIQ8nN9O/ssBqLJ70zewtMlHphO034weFryWVImWLheK8Hb0G5xlhmAa7kOR9M+iFGp1OVvgrYlthJ+mxoxKcGSFktWSALHmywRgI4VffEq+H4/tGlWrExWip3tYdgA9y6nHTTj/RgiXz8rPO8XrxicBCsTpKsWwupIPYgoqN3JQcf+LJbGj+5D1lGhuNCc02JeSmQguDtqknebU9GBmQvBrkqR99Zt/IyNNfzQBYAKNdSFvsoEHk3Cpzgpox60OS5n0IKceLhqLMn+vzxtROIvcXKzLdQnbpbHkT1D2rv9ivqKjp/PoMpqWJuFn7esBmBRbH2XDxE+cGlujAiYjDwUP2SZKDASNqpQkI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(366004)(346002)(39850400004)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8936002)(8676002)(4326008)(2906002)(5660300002)(478600001)(6506007)(6666004)(6512007)(316002)(66946007)(6916009)(54906003)(66476007)(66556008)(6486002)(41300700001)(38100700002)(83380400001)(36756003)(26005)(2616005)(1076003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 007x0dMNDP59vE0erU+5+BKBSsPPLyMHbgguNBR9F+//923JcTi5MffgA/JWIfbQVDgYbrjAP1Xynq0oxOCtxzD5iGQPLyFWvgaHvHwhHjkl4z7i6yj6c7OwFnQwGOO05NGpMrOmRJgfyUXdKJGVvF/UtQNzJbNXuL8RsRt3xiObDQamZSW5MwLL8nDTMx5GRvXsEECksyXiBdnidpGGnKu6xGBTxx8GsTWihaO2YD7dinuYfOM7jb4HaTGUXsjd43EGUwvaEfgSV4ENAdskwehRf2IyzCZhC/LMg2XJi2dQaqTxFbcu1ZKmBNQh0feSOECnqo518m02gjqyk8lNH2XbUd8U475DU2YRnwkdleDeTGNuTo+z9Rh4fig7fWBV8gp+J0O59Wz0IYnWytssehzz8OxNPH7lJe17UqZUbRK6a3Pvlwqgf7FFwLZOVM+2WYqya9MMS/2oLtdPYkC0UfQ6tEvQO6H+32Mc0hwdn0EGfuQxwFQc4ctPrmCV6Nu3RZ/CUOzRMMzk7yUR82y7beQmtFNjfyE98n96oCOxkenEIVKx4r9b23ryigpIx515FZZ1DXcIoVMv4lxbJSEPgSg6JnxJ6xwFtl+jpbCBc+MEkRUnJSdjTd/KNDLzXV2WKMc63+I6ysPYGhsO6DmBT5PgAljXbBV2A7C0/nZIWEcbqvZqMPBSHlB7P2zx1l27iYd4136SFzELclJ6x049Ld981OCrgTIMU5jKM/vEbHPi62Rt9bys8z5r3VaP7Q/m2UeQEZ/5vRlZxhiFtIlycaHbruQUzBn0krNmmZ4jEeqnHPyfSOdESdnAktyxioCSR9F1obmaTORXwn/hewFGQMy05En1vl/0saGvM8guj/5CdU6eI8fI3LnAqK5QwGUaozMLdA+3J2FD0T+NifyauJKLc7zy+s0Fwan7RAUdgjq1NsERJC9xC9UoMOG0HvXuLtDWAv1xJIlFUTJOYn/bEOOwPHhe2VlguMs85Z/E3dUdhlcdrXAWpy4zhHhzTIoKrq4DmKbxbf5d9VsdmmBt8VsO0w3zKAXfzm7UBPL4hgZLSwhPHci3jH9ZtyM+AlNNpjtYIPw4G4avezQJZar12Z2i4NAm0g1ifLVELV97ASAImIf030JGDGN8UPCIjeeXzy4U2Zdo056np6IDQMkitSoO898wGHq8NGA4gh2JbUg6N7Ex9FyZgtoNXAgq39qYiC/QjXEcca4InuGppKYA9aggDP3CkDY761oPW0LIcX1S52ZQmEGSVQJu7mvzoqusRoKdibuennnCsWZsrO+ue8W44LQurZ5W0vLIYOTMb3MF+cHlaSN63A8yPuMwtkHI7WcAVTfYUZCot591ZEBFV+IQEP038Nn6imJi4VyevI6UnYJRJ2SjqtlQhm7byVWs2Fjio3gmRLc4zxWGrUkNTngDJ9jBk9qSpR6aaUSsKTYDTWmA6tasybUKQJs7VgtddH2zXAUA+s53Ho30IvQ2ipaOEdFr7Sm3SbzZoMJSzyxPNA46mbxkVhgnIFBcOw1vIjKLOe046Owz0dnI/MSol0Z5zcbuDpLaTTzB5BC7XH08Aocs6/7NGYd6xGNsyAmx X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f5bbd07-3d10-437c-3e5b-08dc02f6521f X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:14.4003 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JOCn5QMUbMaRpiW4YWypPou0bWLsFRl6LHcscsKsCuF0XU83toaXie6oelkqK+PDlhgIDRAyEkY5p1QzU2nBoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4849 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC lag_lib.sh is added to TEST_INCLUDES to avoid duplication when both the bonding and team tests are exported together. Signed-off-by: Benjamin Poirier --- tools/testing/selftests/drivers/net/team/Makefile | 4 +--- tools/testing/selftests/drivers/net/team/dev_addr_lists.sh | 2 +- tools/testing/selftests/drivers/net/team/lag_lib.sh | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 120000 tools/testing/selftests/drivers/net/team/lag_lib.sh diff --git a/tools/testing/selftests/drivers/net/team/Makefile b/tools/testing/selftests/drivers/net/team/Makefile index d31af127ca29..8a9846b5a209 100644 --- a/tools/testing/selftests/drivers/net/team/Makefile +++ b/tools/testing/selftests/drivers/net/team/Makefile @@ -3,10 +3,8 @@ TEST_PROGS := dev_addr_lists.sh -TEST_FILES := \ - lag_lib.sh \ - TEST_INCLUDES := \ + drivers/net/bonding/lag_lib.sh \ net/forwarding/lib.sh \ net/lib.sh diff --git a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh index bea2565486f7..b1ec7755b783 100755 --- a/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh +++ b/tools/testing/selftests/drivers/net/team/dev_addr_lists.sh @@ -13,7 +13,7 @@ NUM_NETIFS=0 lib_dir=$(dirname "$0") source "$lib_dir"/../../../net/forwarding/lib.sh -source "$lib_dir"/lag_lib.sh +source "$lib_dir"/../bonding/lag_lib.sh destroy() diff --git a/tools/testing/selftests/drivers/net/team/lag_lib.sh b/tools/testing/selftests/drivers/net/team/lag_lib.sh deleted file mode 120000 index e1347a10afde..000000000000 --- a/tools/testing/selftests/drivers/net/team/lag_lib.sh +++ /dev/null @@ -1 +0,0 @@ -../bonding/lag_lib.sh \ No newline at end of file From patchwork Fri Dec 22 13:58:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 13503365 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) (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 4ABDD1CA86 for ; Fri, 22 Dec 2023 14:00:23 +0000 (UTC) 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="Xvpx6XuX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nv445gbQyOIxi1wPACkLVTsHn3P3R3henlYKNVVgaulEaYqxmTYkyJfjoJRnLZbJZCD99KX7CxowKSJ/SLWRAmtQsEQOGEBvOjPI35DzIkwnN8Y448LmVlgFcAV3v6315MW6X+dzB3YRIfFvuFiQC06KRBNADdVfjXv+te4a6a7xWocxq1yYkgrOpxJHuD9S2ZTmfhQWxe2g9BQWdJDfqiugxSzdDLz2aKkSrvUKkilhdvti6K96fxg2T1nYbKDPMMogAxEIsGBgjhscvD+helRn8sALTNeEPGtK1ZHXFOfxiA2EgykZn+Fxvj/clKhB/Q5NlbSrRsMsz6vfgnYm7A== 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=t/qYEPgXrwgHYPkKe/k8+mcKGGQOM7/A/fIp9XtJ6M8=; b=gaxLarTYZoVOYYiV1oKMuqXhjwfvK+/gp/R2DZVK1BciqHTKNF+LhQSJPpj7T0utHHTy+m22T6y/zfRkPFNTwdI2AysfEgAt61BU6R6dfDqYPsQdup1yp1z8I5q+vFcb2wcpGk8j/8g/WTqaUKjFlvy3iacVBajCbhavFS++jip2S4i53ml+e+VdX4G+FCQa5cj9Zpb9Aim6LJv6MmTOAt7+iEt3YKHmxzdelPrzFVRKVwibkHAcoowEw1ABm4W1TJ2q28L/YPdhs0UDC2ozouMZlD/Zl5zrgecWrFh+TSqKAcUBJ+3bglOlny4THnuS6UbZiJg2XeBaUhM6SJxzsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=t/qYEPgXrwgHYPkKe/k8+mcKGGQOM7/A/fIp9XtJ6M8=; b=Xvpx6XuXAPytPtViNNqk+Y/zwUb+KK/iLPzE0AnL1tuK2ZLUxuXsC5kKEiv3nzIrH+jrI8YnsJYDjYeXj38l0P1F1VeteTMPFHWPtlk4nmhOAWuRD1QN7EQs69z58yR1RiZWUNr4JmMiPtTY1YosvKRFhJY7RpGogbONvSCP9Tb8tJD9CjW2AIuCc0YAQMXgkX47I8wTT3i7FhU+JkUhT4FD0T9OsDFMoxzp/3RRewzFcPaRRIAmeQ4VpRHXwOZHGoD07wt3Zw+H3V5jEyOhBr5BM6Eq+qRxEi0VtRQT7V5veKuw1P8ly/MYFz7trGSrNxwg3AqYnwMYUmFyvOHNhg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) by BL0PR12MB4849.namprd12.prod.outlook.com (2603:10b6:208:1c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 14:00:18 +0000 Received: from MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765]) by MN2PR12MB4373.namprd12.prod.outlook.com ([fe80::ff68:f81b:d451:9765%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 14:00:18 +0000 From: Benjamin Poirier To: netdev@vger.kernel.org Cc: Shuah Khan , Petr Machata , Hangbin Liu , Vladimir Oltean Subject: [RFC PATCH net-next 10/10] selftests: dsa: Replace symlinks by wrapper script Date: Fri, 22 Dec 2023 08:58:36 -0500 Message-ID: <20231222135836.992841-11-bpoirier@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222135836.992841-1-bpoirier@nvidia.com> References: <20231222135836.992841-1-bpoirier@nvidia.com> X-ClientProxiedBy: YQBPR0101CA0204.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:67::29) To MN2PR12MB4373.namprd12.prod.outlook.com (2603:10b6:208:261::8) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4373:EE_|BL0PR12MB4849:EE_ X-MS-Office365-Filtering-Correlation-Id: 21d29428-87f1-4419-ec75-08dc02f65451 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A4D07CGMfMy+Q6Q+8XQknW1C0ntIsTyTr1O1k9og8gvqo1HUlAdhdvZ+CL/IW1hBWyGbFXHaPUllwj42GAGVr0yU1cPI+ZphRaxzCnUF+sczr/s0POxowdJeEhD1YWYE0Gim76zf4AqrRxm9v11Uhm9BXu5qxqPIaJnIkE3IdMZbAm2kAXpNZIqAFU9pKhrDyj5hVJe6g1QNVJTzSpZq6M/CmhtgwJ42NBI+CoO45IQ0X9VkDVrIFuA4Tie5LajO+35ERvd8TWBglskqUdMSqo2hRhjcQ1ur5Cc5CRU3rkvJmVfPKIcHtPHIPEwlS1HZmJAssIWmssFDivxi7UoPuP8wqYEKsgaKeMULEqAfH4OnlLL+RNeY7jtOZq9TJENfcTbeeHvSoVys2KzRyrBdDrRPH3zk5TPeSvuzvECoiWeNlHWgP4/KhvwfXZxp/z+lcGJYbS+7Dty0hjk/nhHcVqS6odlIXG092707w6d4+CyzCR5mrnpDLO9TsAzumlv4Gx6Rn2hcHLRuwhncInkoR0/8td5hffqXCwt+QvjSJ7p+OXW/ZTDXjFufE+VHbIRc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4373.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(366004)(346002)(39850400004)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8936002)(8676002)(4326008)(2906002)(5660300002)(30864003)(478600001)(6506007)(6666004)(6512007)(316002)(66946007)(6916009)(54906003)(66476007)(66556008)(6486002)(41300700001)(38100700002)(83380400001)(36756003)(26005)(2616005)(1076003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uPM5MiBO2kMm5n/OqYvP6zYfoY1Vh0Xc4dFfcnGeHVBa7XYoyZMwDtGSwvHtQPLy/lLkSk5eSpRLWc+JUZiv+S8fjLmzp5omOoVd1mb61eivnqfU7HQN1IGMB3Iy4ZkbloOY8SPl3BzZ30pMhHuDk2nngN/d+jK2naE5A7cdu/bfqX1YHBfLJEh62JkDzjw3DTFEbkutLYe0rwCEbOP2TpyC4k++ZYRpowoZ9rpUJxk5aUKqJRpv2Kzl8amIwTfyoAC/2Z0+aCxMQbE1yJTiSZLxubgiY2KACkemCaYPQaWUoWFlwRUDqwuU2b/B0p9pXENICQNiC8Ubca6Xipp2Ve6msPDL2Z+oJv+3VPviBYB00ixigFMP668XnqgpY3e+L7x2xOP2FuH+8sAW8ogr2UGsmnfV/rlyZcpvG4y34JJAkv0zfTU0Si7d2OXaqTjwgIsyQc7K4rRfiZieIrCz5sSpam/OwhsiuR5GOmfSB6yiKT5WTO0qCGTylnX5jZfFtzBt8DR3jduUUOI/+UjHTHkJDSQoHZ1QZJUgWAfbK1/iU1qUgXzjb+S7Yc8QoRHXe4KMDOZwWQsrLPZohZyulv0RD6L9l7ojRLSWzMwvyeZrLEM0CB6Rsw4hIn3GpkMjNs4icKQZxX4zwvpeqgkCQ7Dy6wy0AfSrcVKfPUzWYogal/ywh/InS939568/QBtjEMCJdelXIOoaqFOHOwlTLSX5yFyKDW7au4Q+s0JXfENBextpMu8n2gcCBx95XPqhIStPbCfxvTaNZlZ0CNnTwYJiqPEbM7EksaKRXSJ5N2I6KBYr740SApDI8lz1khGtSKBx6ZDJDRMBX2REqRcAoGYhBWQuvBktFuPSE2ynthdf7IsfC6jRW8rR5hBOXPcUYTtIrjNKwkm9kX01JsFMuYeWDXnXCo2LL1lRAFrbnKf49N8FW09j8tD8aWZUQHpV9HkNCT/5kblJuS6PIEwbvgo1FLjvCLUX+Vn9IVO0fm/8WfJochAvWBs1N6x6UbX0AeG6G0O0efOODAqSAARjdtuv5oxtUJUlmQ4Xr00A6Eh8YWXNymjRAsxnWtrhaVnhKwMUF25kiJPVhTt+fHn0i/loVG9IsyywSvHopW2lPJr3QIKj3lzHX0+bXxQMsZc3+d8M7/jQ2MNI1I+PddaAxTvl0+BJsVX/UwaCTsJ+3jv0v1yug0ownM9mBDH+lgc5bJzrTPbqUyAyGpDgzJK9VKonju2NM5qWnc1WYg2Uy9gb9jEVLp3IMXy2PAW0yN8czm1FRHhIlYOZHOACInHPsqLEf/4EK8/rzAWUSRK+degdx/8g1pKvAHTlqS+eHSXIBtwKDWVwUPe419fmNxElQMfFf5EwyB/flETdiDza38QNfrMHEHq6/2GBydsTun0FjXaZUIXpV2BXLMCq6fzZhC3VhJhDojVAdGbhhWYvkJPfHYLFIoWDajusaGu7QvDFUdNjgrvsKTxlmfdDVbhh6YomZEFiesiNVe7jHVHF21rRooF/6trpYuyHzAS2YFBY8aD786+nW8SRPrZj1mX1q5LPLvxyEOAzS5NF+KtGUwgx77Y2/6qLjP9lzweW9jsdzvstVZF86r1NafeMt5YExg== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21d29428-87f1-4419-ec75-08dc02f65451 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2023 14:00:18.1970 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /5lnAsSYWcSC8ve6bHzPS0msnMNnd+v4pDIruZLc0AnFOmkkyKd/Gimkk5lf4D0mOUlGZMU90GavxgFiOkPSkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4849 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Since commit 25ae948b4478 ("selftests/net: add lib.sh"), when exporting the dsa tests and running them, the tests which import net/forwarding/lib.sh (via the lib.sh symlink) fail to import net/lib.sh. This is especially a problem for the tc_actions.sh test which uses `busywait` from net/lib.sh: $ make install TARGETS="drivers/net/dsa" $ cd kselftest_install/drivers/net/dsa $ ./tc_actions.sh veth{0..3} lib.sh: line 38: /src/linux/tools/testing/selftests/kselftest_install/drivers/net/dsa/../lib.sh: No such file or directory tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: gact drop and ok (skip_hw) [FAIL] Packet was not dropped tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: mirred egress flower redirect (skip_hw) [FAIL] Did not match incoming redirect packet tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: mirred egress flower mirror (skip_hw) [FAIL] Did not match incoming mirror packet tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: mirred egress matchall mirror (skip_hw) [FAIL] Did not match incoming mirror packet tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: mirred_egress_to_ingress (skip_hw) [FAIL] didn't mirror first packet tc_common.sh: line 15: busywait: command not found tc_common.sh: line 15: busywait: command not found TEST: mirred_egress_to_ingress_tcp (skip_hw) [FAIL] didn't mirred redirect ICMP INFO: Could not test offloaded functionality (I manually created the veth interfaces just to demonstrate running the test.) The dsa tests which are symlinks of tests from net/forwarding/ (like tc_actions.sh) become regular files after export (because `rsync --copy-unsafe-links` is used) and expect to source lib.sh (net/forwarding/lib.sh) from the same directory. That lib.sh then expects to source net/lib.sh from the parent directory but this does not work because net/lib.sh is not present under drivers/net/. Since the tests in net/forwarding/ are not meant to be copied and run from another directory, the failure to source net/lib.sh is solved by replacing the test symlinks by a wrapper script which runs the original tests under net/forwarding/. The links to shared library scripts can then be removed and all the files needed from parent directories are added to TEST_INCLUDES. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Suggested-by: Hangbin Liu Signed-off-by: Benjamin Poirier --- .../testing/selftests/drivers/net/dsa/Makefile | 18 ++++++++++++++++-- .../drivers/net/dsa/bridge_locked_port.sh | 2 +- .../selftests/drivers/net/dsa/bridge_mdb.sh | 2 +- .../selftests/drivers/net/dsa/bridge_mld.sh | 2 +- .../drivers/net/dsa/bridge_vlan_aware.sh | 2 +- .../drivers/net/dsa/bridge_vlan_mcast.sh | 2 +- .../drivers/net/dsa/bridge_vlan_unaware.sh | 2 +- tools/testing/selftests/drivers/net/dsa/lib.sh | 1 - .../drivers/net/dsa/local_termination.sh | 2 +- .../selftests/drivers/net/dsa/no_forwarding.sh | 2 +- .../drivers/net/dsa/run_net_forwarding_test.sh | 9 +++++++++ .../selftests/drivers/net/dsa/tc_actions.sh | 2 +- .../selftests/drivers/net/dsa/tc_common.sh | 1 - .../drivers/net/dsa/test_bridge_fdb_stress.sh | 2 +- 14 files changed, 35 insertions(+), 14 deletions(-) delete mode 120000 tools/testing/selftests/drivers/net/dsa/lib.sh create mode 100755 tools/testing/selftests/drivers/net/dsa/run_net_forwarding_test.sh delete mode 120000 tools/testing/selftests/drivers/net/dsa/tc_common.sh diff --git a/tools/testing/selftests/drivers/net/dsa/Makefile b/tools/testing/selftests/drivers/net/dsa/Makefile index c393e7b73805..8259eac80c3b 100644 --- a/tools/testing/selftests/drivers/net/dsa/Makefile +++ b/tools/testing/selftests/drivers/net/dsa/Makefile @@ -11,8 +11,22 @@ TEST_PROGS = bridge_locked_port.sh \ tc_actions.sh \ test_bridge_fdb_stress.sh -TEST_PROGS_EXTENDED := lib.sh tc_common.sh +TEST_FILES := \ + run_net_forwarding_test.sh \ + forwarding.config -TEST_FILES := forwarding.config +TEST_INCLUDES := \ + net/forwarding/bridge_locked_port.sh \ + net/forwarding/bridge_mdb.sh \ + net/forwarding/bridge_mld.sh \ + net/forwarding/bridge_vlan_aware.sh \ + net/forwarding/bridge_vlan_mcast.sh \ + net/forwarding/bridge_vlan_unaware.sh \ + net/forwarding/lib.sh \ + net/forwarding/local_termination.sh \ + net/forwarding/no_forwarding.sh \ + net/forwarding/tc_actions.sh \ + net/forwarding/tc_common.sh \ + net/lib.sh include ../../../lib.mk diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh b/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh index f5eb940c4c7c..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_locked_port.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh b/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh index 76492da525f7..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_mdb.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh b/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh index 81a7e0df0474..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_mld.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh index 9831ed74376a..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_vlan_aware.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh index 7f3c3f0bf719..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_vlan_mcast.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh index bf1a57e6bde1..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh +++ b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh @@ -1 +1 @@ -../../../net/forwarding/bridge_vlan_unaware.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/lib.sh b/tools/testing/selftests/drivers/net/dsa/lib.sh deleted file mode 120000 index 39c96828c5ef..000000000000 --- a/tools/testing/selftests/drivers/net/dsa/lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../../net/forwarding/lib.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/local_termination.sh b/tools/testing/selftests/drivers/net/dsa/local_termination.sh index c08166f84501..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/local_termination.sh +++ b/tools/testing/selftests/drivers/net/dsa/local_termination.sh @@ -1 +1 @@ -../../../net/forwarding/local_termination.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh b/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh index b9757466bc97..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh +++ b/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh @@ -1 +1 @@ -../../../net/forwarding/no_forwarding.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/run_net_forwarding_test.sh b/tools/testing/selftests/drivers/net/dsa/run_net_forwarding_test.sh new file mode 100755 index 000000000000..4106c0a102ea --- /dev/null +++ b/tools/testing/selftests/drivers/net/dsa/run_net_forwarding_test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +libdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") +testname=$(basename "${BASH_SOURCE[0]}") + +source "$libdir"/forwarding.config +cd "$libdir"/../../../net/forwarding/ || exit 1 +source "./$testname" "$@" diff --git a/tools/testing/selftests/drivers/net/dsa/tc_actions.sh b/tools/testing/selftests/drivers/net/dsa/tc_actions.sh index 306213d9430e..d16a65e7595d 120000 --- a/tools/testing/selftests/drivers/net/dsa/tc_actions.sh +++ b/tools/testing/selftests/drivers/net/dsa/tc_actions.sh @@ -1 +1 @@ -../../../net/forwarding/tc_actions.sh \ No newline at end of file +run_net_forwarding_test.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/tc_common.sh b/tools/testing/selftests/drivers/net/dsa/tc_common.sh deleted file mode 120000 index bc3465bdc36b..000000000000 --- a/tools/testing/selftests/drivers/net/dsa/tc_common.sh +++ /dev/null @@ -1 +0,0 @@ -../../../net/forwarding/tc_common.sh \ No newline at end of file diff --git a/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh b/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh index 92acab83fbe2..74682151d04d 100755 --- a/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh +++ b/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh @@ -19,7 +19,7 @@ REQUIRE_JQ="no" REQUIRE_MZ="no" NETIF_CREATE="no" lib_dir=$(dirname "$0") -source "$lib_dir"/lib.sh +source "$lib_dir"/../../../net/forwarding/lib.sh cleanup() { echo "Cleaning up"