From patchwork Fri May 3 03:51:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794722 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2076.outbound.protection.outlook.com [40.107.94.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B3931CD24; Fri, 3 May 2024 03:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708273; cv=fail; b=tu8MzHuZPhvQkhR7vgXmKN87XS9O/TTZwcNMlsuVkdgV4Vp2MiWXw2QbmgTPnDx2bmOwa7HkpzGW9j4BcCBapuOE1sii6TYzkJUCjlk350jxUWhNR8UED9de8khh98yPOYXTjre+xfjkdJkjKKCQpBxNYTrHkpYWwEsbibWQr7k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708273; c=relaxed/simple; bh=FZQPLZWghbhTFg2/pYgoJQGyJYWercFD6b12pURP0os=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=vAt3L/WiRVR8mOrFx80yD/bfrlhfMjk3Cmt8ImiVdK3o06vyCHl8bPN/923DkYzn8bEF1E348bX/CiY0ZfmUYXc3v+j3eIRufC3b9XNK5uzfSVFqRy8wMQ1oQOszvc1MLqbKQGK9+n8jdEkbZLPXx5Yo91R5AaUJTOW6j/7PHOA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=kxhNz49+; arc=fail smtp.client-ip=40.107.94.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="kxhNz49+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7fyyNIFak7+4+Cmh7vdgPScUedLSSrzpbzFr3g2eMhZm0gzBU2we7b4I1SEkkD19hRqC4ko2Rb3fqQLLDU/ygSfC4bXLFRbZY7NEMd9wg0vP1wdJc5GH5bO6kPqX8nB4hE0vRCJimaZCdAjHxpryN8DA5Bx6QeuHCgAcDusK0Fob+wLMN45tk4PQDEVXvwQR7d6ihyPjoPqbRvdxrnNsd/qasCsUxYSnZJC7Iy5tu9+UW+vUyBu5A2qPkQe4owkzz4SUgMO0UJX5keE+q5+qvI/uV7qOj/7aUNjdwtxSyvEkzbK7d9W6dZX2X1dbYBhEmCJRMSByFC7mDT2i7ANMQ== 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=KEch4UNGf2xILDLML6oCjGM+UDhweOuYpthwBkU35mQ=; b=BBFHLePVVt7iHmsptB2kotddC4xk1au4KDTGEPuFKF5LEiTZFbunW97R82iMYkd9jqP975mFnjzMZmIfEHiZsQBmb5mfM2+scIJpmHXdEwvHjNv092gH7GAvljaFvY/U6ps1JfOVUzNJa9SYDo+wCfH5tHrxeAaEW2j96f53QDOYHLtsRgZVlOa7SEW2Og+nSoFXOBBwBImnAWAhY/zGsmIfKb7Lf7pKV5SFLk4dNBVgKdhD0DgX9Ue7hO1xdG4ah3hbvpqy/jK5e+eTsFySkX513+oW9qAWi4Y/ietgz9xTNvE0pQxDHklFC6WNmy2Tw3A0/rVrr44EKlFUYXT4RQ== 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=KEch4UNGf2xILDLML6oCjGM+UDhweOuYpthwBkU35mQ=; b=kxhNz49+DQ/ANRn3r9AB54GThyH4BHgRfrC4+28kJZiHEHwAOKgQTw6JrqiRHypF4W4s7ksiJvKJGOhkf4iQCq6IalPjWfM27ZE9tFA1BnTP15WShjdQJKkUUEt5UhyCNK1qidPdBF41V/uTM5m613zeFtJSGQaH75uhQtxbknttkmVoIfqfYcscUt7Z1Jsg0wjjHIQ5qXpjmM5WDWvGC+mBP2u8gZHpPNTz2IjWTma65e7bNllvEe1DQoMOs0O1UFg9KnY9zT/YrqDyl6dHJSX6JWhid3+CgQlD3ZtC77iDB14bEfrpCC0DwIbngGEiDd/rext0OXMduejbL2zy0Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV2PR12MB5941.namprd12.prod.outlook.com (2603:10b6:408:172::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:51:08 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:51:08 +0000 From: John Hubbard To: Shuah Khan Cc: Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 1/4] selftests/cgroup: fix clang build failures for abs() calls Date: Thu, 2 May 2024 20:51:02 -0700 Message-ID: <20240503035105.93280-2-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503035105.93280-1-jhubbard@nvidia.com> References: <20240503035105.93280-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR07CA0093.namprd07.prod.outlook.com (2603:10b6:a03:12b::34) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV2PR12MB5941:EE_ X-MS-Office365-Filtering-Correlation-Id: 98063537-2a31-410c-dec2-08dc6b2443f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: Z8MRn10j9YzQK/8/9/X4QnqiKspr2jmUQudqWjU8Tpo1+J1SizQZXZkXR46CwZO3EdJ3TSTnhLVD48eTJCgo0R7fMQG2BB8FFItci7uyvv0xD9dCiRHrSVuGcdqlN2EsgeXb6MXWCFbEHdOyeYxwv59EuAfMJjD3YuLXrP4UEwhv8ZIgfe7e5gNBWVQP0swd/NzfcaQ18XzfOI5O5l4PJerKjb0UEg5ZM6Rh1aDY4nclr77iYG9mDy4a1SPMY1nEVQgZ5u0nMrP12e4f+9oy8mzAhMbI0YtSbu87Fz08sHIEUZdLCYdfXdGnwD/wp9XT+4xngrYkNyjfl6I0bquoYg23eydv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ONE; SFS:(13230031)(376005)(7416005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7ubpC2pyVaLTxM5vJ9f7dePekbuqg8ZF/BdVd35d4CtO6oT14fv5SznDTu6OhH+U0YqHc0Deqyvldp+5JwrPG3z0eig5UsmPSMk/OtcLDUupDJvm7fGzqT9MsprnsFVOAcXSoelQikPXrjliECIuMHt1RK4ecMGb1N+1l5ALWzMre/Cfh6VqE5q1Xp/rS8d33VuiovV0Qi5syR0fA9vI4ArqmWtJhua8e1lyLcWFU/MkzTsPE5ivDUI/SQXOVjuwdw2Wql0Zt8m6mqdYnw0Vueye5PO4eTh5/50UAzVL/hpnXTfdNOU/rjZ+Mfdh1N450gIAhihNyRuuTPNZIPydSnZURRni15bIzx28DWcb4n+8+yt37p6IwtfPNtVbAw+bd790opMggvCh/ow18ZSVCXhQWujLKnAuuKT5Wksa0dFQKXAh4k6WyM21Y+DFgLVnb+JJjfvt72VQfEghKw17yyWQfgJWI0sNokkmazi6TgnvK2Ngq85lJlFp4VOx1UMO2g82uPlCWufBDfz9tfHg00E76sXnLxmvOnaMoPf1GZ0uXiNx74XYcIxEsbX6P1So4zdi/ecNF6FXQ44E1zGuqGVxqOSHFe22Kzraf8zBDTMUFbk8l/WPR5yLbEgitePTETW2QBYj9aiOakM+GyXDCP7mFb0UunTqveTyNMY+ORBXdndXddSl+JFxxsCe+qHNm6L9LtvrzY+2WZEv8+E/P0kKN50/LmAlKB3BrJ6pXsTsE6ZfrEu3DIwUP/jbR+I3wSltnmVdXZ1sZ3eZWpCE/p+buVVnasI0r2aIfD15fS+kM2uBNFmRoNkjDAYItrzzYX6yN+yw/jOcYcKTAsI1eXOWkNmeb3aXKvUxdcWD7Loma0exPZZuCquAV6jHRgtGAzDIL3r421swAUYw8TYqk7fDc/aJ3ks3gduptN6HcXb/u9EUa6ilCcKwlQYhVyOzozjJWXpf2ib7q+OQIJixY9Y7gOroaU1WombQqlNyHbPlWRVtG3nM4qpVtM72HNNtE2E2Ec1iz4YctgDLSO9HZZOenwFAjvixte9oXEkDWcAZRR5fgNRmTpzPmoCNP1UN1c3LukapzfVG4DZVuC/fb1ASI4L9ri9x0xnq8sxnxike9jewpZUjL9NQjJ2MhUC/fEtupqJw7GS0M0BRaZndRTOraamwjbDxIC5Boy0Fj/whyE0jUgPwvysWfVLL0XvMfReMYAjSBTVdlcUwp/0hJbvMNb4j9wMtlfKsAh704IFkx8j1Hk2cwG8dhGyAuhbvZ4RSY8Vi+3I439i90mphlZUMcIj+530jQicpgj1NvCirWvbMD7crcZmJ2Leo1RIWj2gHjY66qlkxN0lKqc7haxkScvZvmgJo1IOAbnd4pt+jcmug+Ezt6ApvXctHR46yLhQYXvNw6zef7NuXTI+55g1zfou8cQgD49qO6pACcAJ6hvRoCmaurGRkt8FOlyh0HLvdK6S0UZ8sk6OOpRc0c4mGME0HcFP4bq9/T5TXTRFoA6EBj9/dtkyDnPfqTd7jCNm1FvBqD/tnKGH3PJzgr2HILiWhvaSJVHg5NX1k8Bf1TasjeIJlvNpMwWyGuWGq X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98063537-2a31-410c-dec2-08dc6b2443f8 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:51:08.4339 (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: 0nI1iNp9a37M8EirS5zBXkpxrc7wIQEOd7ZqeBqH/7Cr/Sqmmfx1wer1RlWsHURm35c5DBYe/Oto4ulvBU+u5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5941 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang is pickier than gcc, about which version of abs(3) to call, depending on the argument type: int abs(int j); long labs(long j); long long llabs(long long j); ...and this is causing both build failures and warnings, when running: make LLVM=1 -C tools/testing/selftests Fix this by calling labs() in value_close(), because the arguments are unambiguously "long" type. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/cgroup/cgroup_util.h | 2 +- tools/testing/selftests/cgroup/test_kmem.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/cgroup/cgroup_util.h b/tools/testing/selftests/cgroup/cgroup_util.h index 1df7f202214a..239633e936df 100644 --- a/tools/testing/selftests/cgroup/cgroup_util.h +++ b/tools/testing/selftests/cgroup/cgroup_util.h @@ -18,7 +18,7 @@ */ static inline int values_close(long a, long b, int err) { - return abs(a - b) <= (a + b) / 100 * err; + return labs(a - b) <= (a + b) / 100 * err; } extern int cg_find_unified_root(char *root, size_t len); diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c index c82f974b85c9..d21d3d280ca2 100644 --- a/tools/testing/selftests/cgroup/test_kmem.c +++ b/tools/testing/selftests/cgroup/test_kmem.c @@ -192,7 +192,7 @@ static int test_kmem_memcg_deletion(const char *root) goto cleanup; sum = anon + file + kernel + sock; - if (abs(sum - current) < MAX_VMSTAT_ERROR) { + if (labs(sum - current) < MAX_VMSTAT_ERROR) { ret = KSFT_PASS; } else { printf("memory.current = %ld\n", current); @@ -380,7 +380,7 @@ static int test_percpu_basic(const char *root) current = cg_read_long(parent, "memory.current"); percpu = cg_read_key_long(parent, "memory.stat", "percpu "); - if (current > 0 && percpu > 0 && abs(current - percpu) < + if (current > 0 && percpu > 0 && labs(current - percpu) < MAX_VMSTAT_ERROR) ret = KSFT_PASS; else From patchwork Fri May 3 03:51:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794524 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2076.outbound.protection.outlook.com [40.107.94.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7C6D22339; Fri, 3 May 2024 03:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708275; cv=fail; b=IcVIpE1hV9FqStRnSsPwDqXagg7W7hCCATgJkxZEeOASy09NRFgybrClxVskJwpIL5sANxI8u28+o3+A2sbqmCzW8OoGlC5MKg8g+wAG3xwMZ6YOuYOQrqpN88NuoARBeBedk74Z1GGZ6xJsoHNujON9oJDsksG511t+rU1kCBo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708275; c=relaxed/simple; bh=417ntnB9MrrTmbxeBWGwgKj5y/u954m6VJ328OcPGzQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Grv6ulagjezG9IPT8rvNc8EITAAOFvU+wr+3p04TYygnd01JvWRUGL1TXSdyQcRQcou3TeKrWaONoA5LeamGdsxxWUsgwr0+/Iq+uQUhlBKmUqPj0wAfzSx4lkLAOTCZVeBf8UYCJjQRWhQKQ5QQwAoOebtreCIYMlIq0KaF6AA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=O6XzoCOA; arc=fail smtp.client-ip=40.107.94.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="O6XzoCOA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g2A8uwtfYWrbCBFI/gIfs7LEWlDnWdeaNMrDFRsxuMR5Jk9Z130MO0ZRu4pv+jcec1KcerpW37MBjGI75FgSqX6igJRcw9rqscyQfXV1L0WCdJgmRhFNnKyvn5ftylhuT+ueaBTVkHLgZCDdJB/JIoF4RDCZBRqoWE+yTSShDNd1fc/xe0/s2MPe6uUqFXK2OfGfXLsF5twImqOK2YGhxVAFPG3/Tb8v3eWBQL642SlLUM++gfACbWT+Li5d3ny0E7PL4ZM6yzX023uSehzZcQUZ/3D6F6tMLM8U1HNjlcfTFmevZHYECGatTHQNd/9B9rySYOfhe15P9liOKald+A== 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=VY5K6QS7gWPPRtUIjjZpOjz8cFslahzMJZL8S6Pxl24=; b=ctdswpoJ5bLa585NuZLtihwtYwk6AY/m3fe4KUripKhcNgB6rbPGS6c+9q+YZ28/aVPrdFeePuuLAtlf9R3tfZpc3gMHDeflMp8nXGofsF92rfTo2iGJVZJ58UYCxy9OXh7jQFeq07BHigGVAEVN0CfRJlY/GRyhc4aI0E1fIRaVuk4TX7qJkYR3EvhQMro45AI1tFz/r8RwwP+y6zyDi5u+n4Nu9YsDw8SEMAl6vZZfzpPmnAn8HW/qvSBbEiRwDybc4C0uPkIPcuJ6jHtcz/6OqxpSSNYMfeB6vpS6j/Snrxpz9gTH4q24qgih9snW56phcZiArbEz5n7o9Ci31Q== 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=VY5K6QS7gWPPRtUIjjZpOjz8cFslahzMJZL8S6Pxl24=; b=O6XzoCOArNHSkXGWe9CU3OkEAxm8Zay4V4O9hYnTbq7HMssI20xcxXRAxgseDWZcsyqAuJ4D4VX7WFXdwAEAt1HxEtemxiElBr5787kBxdRpkBEl7J06f0Rkaqyrol0bvD9e36iczQ+fsETNdxg+CrkQiYxpkO6OVeQ8s4za+jV4LH7J0EcTi02zrF/n9S5ODX915xYYipYR9mBtc1iELvocLUP7myfijEB31vMsrVdyrpIXGwOtYnjHdVv4zwg4R7pGSB8gEu1vxsOGtSiaKZP7QyewXhn++ynM8DHEeApI4D8c+z1k3VZa7mJZxg6gWzDCHFVIruVHGcT3Z9aIkQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV2PR12MB5941.namprd12.prod.outlook.com (2603:10b6:408:172::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:51:09 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:51:09 +0000 From: John Hubbard To: Shuah Khan Cc: Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 2/4] selftests/cgroup: fix clang warnings: uninitialized fd variable Date: Thu, 2 May 2024 20:51:03 -0700 Message-ID: <20240503035105.93280-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503035105.93280-1-jhubbard@nvidia.com> References: <20240503035105.93280-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR05CA0105.namprd05.prod.outlook.com (2603:10b6:a03:e0::46) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV2PR12MB5941:EE_ X-MS-Office365-Filtering-Correlation-Id: 6bae8b1d-5763-45a1-3c81-08dc6b24444b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: l9cyRRJOG9mKldp+jsF38ZxWuk4dOqg+iYqYSo0zzp+zjpfOzcZEzCy4Ln7LdVFQBeQw5AMdUBcsCVaPo3wF6SfPTRwYbi0h9FCYbL1mqeSemcEQFOIfwoRroEG0nyKehhISs4fUqwc5BsIyNZgvS4vmtqS1Ty/O6x0xqETIbRqhbe+eQ4+gsRrq0Q7P+Ujq5UwnKas5uYd8EzPkx7dDd4+fyeMKxwqwAgQhwwTP574HVWeReZpkwB37XgSEm+VqoVTniK9aEofEIo4jC0xf1GzSPT3qKOtTsiW1n6vT7g4Dnek/Tg+Tnk2xrGbi9ARuqssavNzK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TR:; CAT:NONE; SFS:(13230031)(376005)(7416005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qcR21lO+rXzh5N3sssXtCrSuInWzjZwa+YnKBnBRvyKjVvPhSMyNthOGIJiMK4vKRE3ceN7yGzIW+kyZpEd4jaGmMrzFTcyml+kIGYybfFE7qtpS9KhS7zwc6tQAIu0w5vAIF84CekclhMhJn5vTiYewpCcOpDhxpzrczT1hyKLOvQfQ0vb9Jl+Kb1Aij2ew4REk12f+Pl8JybJW4v5WcplQIzI/vQEGDUDo7y3aHVGokILooNMzUM0D5/e1xwLg3+dX0KzxE11QiMHNcMj3I3hxQeWSaEaj3Wo4fg2EoT9PVlGeWW5l27q98ur3OKRvAo7x9ybdPe7yTMbsjD5AJszorY6UPjPaNzH94kbkoVPuX95sJMz14jnt38HFgAoIkPqPpJhzxFmTOz1+ofCw8iUALLA3ZzZPQ6B5H33v1WVXk1u61yyw3cehFYtd3lqUMqbnhiLb09p1dohWM9NHGxfUekAsIV8znupbOowsrNM/qu4Uougu2ITpvEQFbnCxW3C/K/K1qnWbztq8GHLUfCOH3GFVxmAPQsZRoHJpZTLpRa0nrDxnvzgRYF1GMFbv9VQtp5B5G/nck5fhjv8OC0a/KO/AzvtaIaeFootffpFnH5xHkslExbsjeZgI+CsnQlVzecyPzSgIUrbJcaD/jYgkKSkbV1cF5LV9/syJCrwrjShWvdONM45qbIIXXsZwJr3LYH5IaqTe/WqNDNpJfIhbX65ekF8yE/u5rzxhpoJeGH2Q48QBsn+asFonQTXG2aO9VRfEdVUpPFadZaqOP00oe2qQJ5lJGmtBGj2dFdp0XmaKxOoEkAKNeGElHUl5jB24G8sIcR8ZiQonZAiAmbM3aIoPkUd59f83zqC8hDuRG+NgC019rORa+4iHLrnc7tf6aq1QjaayRwS3Qn3WS5REnZa85Ke1tFpDy9p0R8zBhSrck3vscn5FFlZ/Zfv5BXbkpHVRB/M2WXycUr4ZR08BXqq9YZ1aIIEI0vbHuF+4CXN+SkgRAgRC81OD9pt1uT4yGi7TkZohItk/8sj7LkMxXjyMHfVlrB1gwN5992vTPDCXBlGIhjmiIk+3MBxhTiYmOasjmtGasf+sCB4lHFYxCumynxszfHRmZwqScTXGy32XBVLaZIgaD4sFMODgxnBW9DtRBth5Pf5ET/X51BIg14rqNfMr28UJgoc4mLNwPHJaHYBT/7QQ0gvw1pxX1nhJo21FiGM6JWciSocUKDvgX8b4cKb/ArbD15Uk+H7gl//oNBYCAuXd7akCRybzOBjOqSF+gV0TxT1qYL6yZ63z3WsxmbUGd9RvRoVJ3fB4jqVYRDGoX4ouNHZo/SII+580wG36/xBZBn62Xby9WCI6KXuk9V53AGdKPD/SsKWu851MFZIgSZksoxGdSQVjiGFPUnK12v1PeYfl2/yktYw9bTgD7vtLToxa1/d/ColuS194HXYvHkeLttNvTJOtKF3OnZsmPTWzEordDEg7hwtPNTNfy44lc5X+eobEphSm2+uHtef9AnWOlwv7WESHKiVHsamfvbLVgBDTo46LN/AkNsRVdqGN30xN8W5nSsQq+KeXH0KUdUxBDMSMgVvf X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bae8b1d-5763-45a1-3c81-08dc6b24444b X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:51:08.9521 (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: SfcXSMxPWHCeDzvWHyhCglLwyDZnepBQW3R1X5GPejEG2Zwt5J1rF01HtWYw4YgRZPKC9mfo7EQwfYjIRNjTcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5941 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns about fd being used uninitialized, in test_memcg_reclaim()'s error handling path. Fix this by initializing fd to -1. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/cgroup/test_memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c index c7c9572003a8..a97832b0c1cd 100644 --- a/tools/testing/selftests/cgroup/test_memcontrol.c +++ b/tools/testing/selftests/cgroup/test_memcontrol.c @@ -716,7 +716,9 @@ static bool reclaim_until(const char *memcg, long goal) */ static int test_memcg_reclaim(const char *root) { - int ret = KSFT_FAIL, fd, retries; + int ret = KSFT_FAIL; + int fd = -1; + int retries; char *memcg; long current, expected_usage; From patchwork Fri May 3 03:51:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794721 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2076.outbound.protection.outlook.com [40.107.94.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F7EC2C190; Fri, 3 May 2024 03:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708276; cv=fail; b=Kob3eiYCn7y7xCyXyx4wJajx+XjqsRE8fYFqFjdPa9rWkbp7JyeGP1by0AWLxh0s4kdqMx57TE7+gdWriDoX/CkMnZRNDjEqTYtenq3Gop2rjhFWAdI8OymBQLja0bwD7neXxVreyEzP+oKgiABZ+gzi6i9NXctgQjFVXHVQe50= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708276; c=relaxed/simple; bh=7yhe1LCaPrHq7LU4lyvPlRHGEsFGtsVIA2JMq8j8BvQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=k9ehNbHi8FqFrYpz/qDjPjBVEIS9p//JhQtOIjizEiJGIneySM4gtcqpmuna8MmmcwMInTGA5EZbUJ0pfQASiZJ7ESMZLDP2Ona3omxTxYMX5loWZ1La8IYRrJ07XKy2ydW/hmWEzt4o+JeeucbLPRrG8AcZsIMw/YQoSfZFZXQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=qBQ/QICL; arc=fail smtp.client-ip=40.107.94.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="qBQ/QICL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fg6NslB4rVTXV++znvdpS9FQU84fXsx52d+5JTLM0juwtEh7NZUSH6gW0LQG4PQEhhT6J25H5HYmXLGgFWlJGgr3GvQOabnCux3sE/j9kYez9BczPA/3PFpmS16GxEtmnRX9r6WmZ3soCOPokN2URFz8pIcHHrP9McfbWN9b7YtyRkjB2SEnCWli3wdn6zdDentGmCUFd/r7mvy+cwD4avOziwQYe9ooKXz/JwA+ecZ+PaVLrwrB7jqUSUE/T/GfDLC61MB29WIB61Ea44rY5JCU8QgaVHFr7RzJwWOsqVk+goOzZc9OpQ6eG7ZcEHlw2DRXLpzy4wf/UaXroy091A== 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=c4BRcRLbmLAuVmb5goOiogq51kSab7J9azMKA4MN2ZE=; b=iGDVlFuT4SZTZ+CHGCuLDuv/Di2aPvrsJ+WvEqNxM+19tOqtYegwU9txLizlvVFmlr2wsQzP9eVyfrQMGldMI6iYt8sXEngUzvxqqa9CH6QS9/+LbqFX1FAD8KSZxj1QIXLgsQAedhoLsl3YWQVwA+7RrZjUVm88HVE4bqp+79cZzvASx5mPB9QoV3F55ttj4XfGhnQkA4e+zSySqZyMBavlas09jrva2T9pNqfoqEBOddTmWrPPI/ArNsMZ0/Cecn6hjxjU0cPWlm3NtUZeXErP02f+bEW4qWUtgY1TQrJ0JtlB3dV8+F5kZJ0Yrt94CXCqDL0ZMbsCgAk/77bHBw== 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=c4BRcRLbmLAuVmb5goOiogq51kSab7J9azMKA4MN2ZE=; b=qBQ/QICLRz4v8WhEH20tpPo5avMLqydq7efBKM6yeJ0h03NB6nWHpDzBJqHB5X+fBJlZjgw4hlH8Qw/qsHMPCS5MoFFiW2DjJxErapO0LQbFn8jxBE6106RZWF7A/V5iGofSEN+xYsvD8d5WW+xhHnkkTAb/euxVDufh4CvZ7gBHmGMKjcWfGH4COWwaarQOae+EAIHaEtrDr3dpxlqWbXILs8V1abtblhdKc8kHfcpbU5jYFdPM6D/OXiivWFE8hSFzJW/iqz/gHyJluQXflb7TO1JvxyI4x2khQ4xZe8h8XF4kRew9DTWUZCcp6esl/fMKa4CRkPtHJ0VQT0IPLw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV2PR12MB5941.namprd12.prod.outlook.com (2603:10b6:408:172::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:51:09 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:51:09 +0000 From: John Hubbard To: Shuah Khan Cc: Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 3/4] selftests/cgroup: cpu_hogger init: use {} instead of {NULL} Date: Thu, 2 May 2024 20:51:04 -0700 Message-ID: <20240503035105.93280-4-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503035105.93280-1-jhubbard@nvidia.com> References: <20240503035105.93280-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR05CA0077.namprd05.prod.outlook.com (2603:10b6:a03:e0::18) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV2PR12MB5941:EE_ X-MS-Office365-Filtering-Correlation-Id: adc75903-838d-4458-3b95-08dc6b2444cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: bqLcYowkM8TO1Khj8s3wt8AQJbe7P9RkXIWvJZVit5vT0SB7L/aySBOj4jIIt017x9t6hoks+bJ0nm4INFDf29Nb4agHWWfSFfyY8BIR0hlw3gez5abnl+/bW2xR8RbuNr7/33ZKeOgnUt34fiLDoKqqzu40mtjVQaN1lRXLTxOzb0W2h57WgW2Mx0WqxsjHhJnoPbPhDTVR2q1AN3LNjULz06pXlzSFACp3uDOemfcTd9E/5ZSasTOQhx8jWsALZc0mNWrshYWMDAsOS6JGZ7SzKn7N1I3Eg347pAXP2D3egx+jNVN7530lL4fsT2OlYU1ibLCbE2atLxsdPNR4JrEJ/HOaXZz44qT3ArzswnJSsJrdaU/9PRSyh8YT7f/8KHsY5yLALTrHngEUQFGTlas1oygU3l1ChBuysI6Ra/O77h5uGcaXOAFhkyvf4YM0sjDPdkbPugK1RGw2Q3UpeXsZ0pH6msAt5VC5HTELd7a7vhUHugmnF8YlhP6iv8KuIMcc1HG0+GbfLSxkhvvzl1OklrVthdtLFyB2BqAF+5//ZpZFlHJr2Nsx6kXCymclPlFRDVjLgu+KfoI1xw9zOO7kAfR5hzRoG3m8kBaNEx9SecOKZHzxwsJAcIT4tgmbWQD5so2r/XRE0Dx/zDQx2phMMZLlvrTc5lsG7reEwskFP/eDfRtSaCvXgpMF/4NV1+RZvQewhqHdkYUtJgAU5oI7sb3eLlGFRF55ZQEh6+w8q7rtUSSH/vTYiGgjpbRJczQxakgyr0gG6aT5Y+Q48riA6HDZLTITSJMVu2xE0IgQV4ykKFxw5NQ3N8dGBdjbRbGfwZw1l6JXOJAYubcvXUgejYqc01vCmSkHPadK8h9R0un2tF7Z9gJmheczVPPyNjuZoCCO61e0LxzaHTuTgnNegXyZsIZhLe+zE0MO0Z/PJQumV+R9mTW68nGNY1Q8JChYz4caYfFeegSe4vCgd2D6HOFhkHHmZekfYz4QECbvae8JhrirJximdCI7/IVUbbf476YxI/UARsq0ydrXnOhJvCXXWhtYc4SAZqy4UDbHfeeeGr9lbdCrMF0y/KvdFxRUVGl+hQtJE4tqYQXV7/zx7ij4eayPQgoRK9G83WTYrQWTlXAnUSdLeHjuYs4d/y4+K0BGD9Xf5mxWDyzTKkHJEG3FSOkK0iwvzVNVDoMcJ//jXYOHGGXiY+t7miaLozLEokIhfmeoqiF1dT6TqG75itE9UOo/bkk5QCKFu/PtAIkzn/XzPf/mgSXVjJ0/y3QpaSnekQEGWv7LU3NKqQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(7416005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HPVS13N4f+A1ZrICFCT4X4YIEMQApEhLDdT9i1uXiSPZnrAdrki/CmD4H0/fjCiOM/iOiHJsz/mFG40wdCzu4j2GAPLFNhM6cYMsZ/R02ZIRcd6mejUEqsl34UxEafM1qGMQNN7dydS5Um72WttviN56dbbgAK7JGUYg3lsBLXsJZWyzTcn8IUe8hFhFRVUaNx6C1p+Zo5w2x+e8fQnO8AsP7ox9QIALJCs3qEjS/kjwaEtslthwQ2Qdw6v7mMfmz0fwOp8c5t7NZIG7Igts6ahnR8b7drNb1FjbS0whVwTroNlHSLqQ23x9a/2hWP/+jTK94HG+/DqB6I3Gk5UHVnvoErbVr+3WKBQuZmcmqHMxLLyjCHbBYSjME9jiiITkAf8mj6LF/Cape08xsX69m6GSIsGMbwWgYQZW5pu0P12fkGP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DcqS1Kn1KlPUGzE+xexpmijbTV+2igjzaGTJQV2a4ESDT75AyMmXR6f5mIUqN5g9N3GwLfCP55LPdCx3TP9Xc5Ac X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: adc75903-838d-4458-3b95-08dc6b2444cc X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:51:09.8077 (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: JlYkCjR97NgTPkKqJ+DeRF/LoO/Mw3mO7lkVV2WF+HJFqK7tfrD5B1bQ9g6h47AqNCCDzFwP7kqTB505PocSNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5941 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang generates warning here, because struct cpu_hogger has multiple fields, and the code is initializing an array of these structs, and it is incorrect to specify a single NULL value as the initializer. Fix this by initializing with {}, so that the compiler knows to use default initializer values for all fields in each array entry. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/cgroup/test_cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/selftests/cgroup/test_cpu.c index 24020a2c68dc..e4266b60e5ac 100644 --- a/tools/testing/selftests/cgroup/test_cpu.c +++ b/tools/testing/selftests/cgroup/test_cpu.c @@ -237,7 +237,7 @@ run_cpucg_weight_test( { int ret = KSFT_FAIL, i; char *parent = NULL; - struct cpu_hogger children[3] = {NULL}; + struct cpu_hogger children[3] = {}; parent = cg_name(root, "cpucg_test_0"); if (!parent) @@ -408,7 +408,7 @@ run_cpucg_nested_weight_test(const char *root, bool overprovisioned) { int ret = KSFT_FAIL, i; char *parent = NULL, *child = NULL; - struct cpu_hogger leaf[3] = {NULL}; + struct cpu_hogger leaf[3] = {}; long nested_leaf_usage, child_usage; int nprocs = get_nprocs(); From patchwork Fri May 3 03:51:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794523 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2076.outbound.protection.outlook.com [40.107.94.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E99B6D29E; Fri, 3 May 2024 03:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708278; cv=fail; b=LL/Zv1Ox9JycfmM7I+j3fzLiNiP/8xNfq4zQlosE2RF8cwBTNmuapXd1gcstebXMtIrOoXm/5cwR0F6vHX7qYJ4lYucjYMe2WsRDG+Y1/yaatQwOkFifceWFqSIt0yRu5voJiKgr4tsCT+xY48k91YBX3R5jQBSxVsYVBl6Jwh8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708278; c=relaxed/simple; bh=BDHLtMEIEzZMGw3MmdXRT433IYCSaFZA9hzavxG62BY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=UMZB2CEA2K1Vb7woh/wiaxEHAmUYcUnrnpwwa7S+xSw/SeYM59tWIc5ANZXrQQ4gMEE8tomwYbedi3ih7EkwSUqW8UFJ+a2yUnsVM8PGGFHRRIKSWBfkMmfE4Tb2GBn0iVDFoFpjjmnjs/pA0pA+h8dc7vctmwrlo1l/EnId6l8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Yk3uGBVN; arc=fail smtp.client-ip=40.107.94.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Yk3uGBVN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KGONHHzWBWqkI1SEm+3gK7UxfNAO9NqGarkuCpUYgS8OMy6ZxF2HOSbeMzqtmLqe19RUY8Le3UqoZCQyjd77OeAv5luXWUN8zaX9IaWiVxw8UMzqFZ+NjlfSoxgmXqCjIqU6VOWl9yt5NPpeEd/hQ8OCwVMnruShJ2GiizhmdGrBe4rlxfbSK6HIOfzkhvKxOEjWgfh6/w+hDSjiNSYreDKe41rK2C7hDwVb2xEXSTs6pcX5uC4kphIVwJcTtjcgTifjRooCUAyYO8liwwPVC93nTNV28ak0ToRPNjfWDhf4Gypj+57CTQ4WJcwAkbQUwFRPXY3ay/1OgaucLM0WHw== 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=g9WR5gBtXv5RhOqz26Rn5f7ugl+K5+DGwc1J+hEvwes=; b=Ll3CZIY1gMUC48rNUQQ5rjmVTrNWWNRdeL56f1l+gjSNawDj+od3Kzns8/qmPBQYjiyjutMbi4RuZBSIKq/mdbWLEQBi0wLU1D/Dl1Vu3tw+jZA2ePXkUH11ragCt2PwAKLHsUROBTkM/yEEkTnJi20CAjjz4j7dJBwZUlHwLmguUQFTMyGyX4k8CozbTFs59GwSt93lhUODRECvpT7KEOnU6lFECxE8XpVY8q6dXQvn1m/EIb1PFkM+OfpWrS1W9/Gubm/9PD3eAL1ypdboJLWV/lY8aqbU9LYXsO4AdWRhIvTxLEhbcyUwS+1R62ilXJ71ubW390sIehTOJNYPZQ== 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=g9WR5gBtXv5RhOqz26Rn5f7ugl+K5+DGwc1J+hEvwes=; b=Yk3uGBVNIMfHmMQ5t1wFZTxIH83eq3VYcXLgKOIRSTR7PZg5PpU/vU2BV8LGLalDZmPtFSiswE9GlvEcHdQY/vpSsMmDgvKqmI6XnURfr8UXtkrDaqrymoLEwTwJqcNMhs4kvI108Bvil1mHkxPY8XFrISztJZOEUVfBBeeLN6Gut6R9V+yhRXYjZOnNFGWe/lq874IdYDyySrN9wH5yzQ7C2gO2Ulv0MjpI4x7U1Mb4fdS6gwoMcRxISuJJpLXFIbaxhlriyPzHM+U9v2OroMoQA2r2gd2Ws/o+oS/LE7qGE3fmtQudDuhOrA7jaNRvKVuFPKIEKwQPel+9dfsSCA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV2PR12MB5941.namprd12.prod.outlook.com (2603:10b6:408:172::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:51:10 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:51:10 +0000 From: John Hubbard To: Shuah Khan Cc: Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 4/4] selftests/cgroup: fix uninitialized variables in test_zswap.c Date: Thu, 2 May 2024 20:51:05 -0700 Message-ID: <20240503035105.93280-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503035105.93280-1-jhubbard@nvidia.com> References: <20240503035105.93280-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR03CA0066.namprd03.prod.outlook.com (2603:10b6:a03:331::11) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV2PR12MB5941:EE_ X-MS-Office365-Filtering-Correlation-Id: c6f64795-4aba-4d09-1df1-08dc6b24454e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: qpMz3QmN7eLRPcMERVe6qgqYo1f0dz/W1jEWmdEHTW02fp79KTBcOYfyDPBSxNHVrlqgOUoutaTyj2fXFjbRjiqQ9ART/BGssE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CnLW6iAT2rgxjUSqVLWKu+L28PaeaMTZuYmxN4/7aEo+jkTuy6lb/03GlOQUYa9ULoR2sBtVNOKfdkKOoNBODUBzRmbIqRXohUt3/vFRl+ewBkGCg0n/FbQJGOmdh1dqVL8Wg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(7416005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: avnkGjO8HoCCrykirEHUS+UmO20eAbBTCFn1MrRuhw9kPgyTjaVGZb8BiKoXFvgFibPdesHYUsFmEMTnQqXQwg98El7OrkbR2+TXjPNy7LgWZo10oiQDagvH8yeFRxNB1Oq3zsjFpp6iamXfjG8CZQOg2SeXJ/kK4+mtt6Xl9V96WF/QuallUkVWivlgc7cyODo4hvCCuUjOyT0A68P3kBgUlu9vHTBk+w8ESeVdwrD7caw9XAPJlT25vhgf95y9x5epYk48jhCH5x2FZ4gTzN9oEcmUdvnUszaHcWVo9L1SajioikE4KN+oHfILHxbhJs0EBt7NxCFpxF3M4RjWLFN8mUlpeEAZzUWaxs5Ei02i5VcWCtsdh7IYSrbho7LI9ADecnADHWot1/cAxafvb/Zoc/X4fo6oM+Fe5nT58/fnZhLUqizjyFU5mM1qnwH75hwzzVD7Pyw+9rzqBVzqaThdVmHH+0QsTVTeqlmkU/mjx2QRFewzuZT+XiM2DFMPTeOzl1GmTRT3Q2L6tEm6rzPpNqj/mRJIOt6X24CHMWQiQD0pDKWvkcZ4bouZ9k0ctMmJML0gjsjqm0aLUWbOTTNch+k+wIqpsHk5wlgzWhm5yxaz1CibC01PB6sqizizBFoTih/KTWamKW5pppuHlEAP6mOtV1AAknBw5/G7edPVD+Q7qFtc5SP3RWusHqLE/+7GBkM+1IWTxm8d4+zeWSyQd6pdv0dTDDJ3fp+3C/CKOl64VJGXR+zdf/qf3Quopi+q1mYZlQG6Q6TI8KoPXNtjH35wJL20xbzUTwFUNZa5LgoUahY7Squ6FDKAxas4Xb4+MYeXVeSO24+SB9RTqI6smIm4ckZeXGuLDphbXYhB6w58e5Z0GurSUSMR0rppFcRFFAI4ZHFSHOcw/jaw5IH4UsaD73HDfXF63o1CnY/q5FoQKwvejG/YJjVd4Qpdttcq9YA4wJinxIdkrxQwNyyHJK2WGNjVbyzEvZ7IDpMdWzQ4Gc+UlfXxE2KETgQKWTIGkaPgaE/qV3+3k8TslYiiKm5C0b2MsMV0bRJrORDWXvJR2sQIecHqYM7c1n4kOBcY6/HcCoi4djdaeTMX72I+rXFSEPFjqD5hhEkzB5IgtQMr3kXBeXUi46vaSHurb7pdwdNpg9nA4z98hC0UD8Ydj0yf7T1yZcbTlP50W8AAD3MAaP1lQqzLb7LyNXOFVt2Y5JQKYcowY3JvVIO+ifNMWGz4f4xAS40AmS1RntDKbNJ+tU2AtY+3lOMrxHbDv+svZi+vbkfSIjh+zYsuQLU3pQVCIqjDByxKZtVovBk3Z7oEjfSfqb6oQS9Kc5hoN4+DV58KTT/0EJFnisvG4Syb2ty6jaxmnIIPDL1UTnEpLhsNPb84yG/wLZHK9brf6JVK1UfsfzScTma2K7ZobYvm0PnwnAiFvtmVzhmNnfePK9qJlPvfWNO2GEuscT6eBu55+bXj0DaDwIfDE/T1eJARcQXJnlBRjxfSX6MwtksUv9w1HhekK7rKbKQZ4A3OjGm0CNnj2/Dzc5am6bZ5/SQmEs1nOWmC+q/UKyRD2fwB+XW66xDlbDeHmxg/so51 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6f64795-4aba-4d09-1df1-08dc6b24454e X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:51:10.6566 (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: qzSnx0lCpzoXUcIapPFYR8xB+3Yu2Ak3eEWST3lH/p5cBA6cRK0sWrJnWhtvEOjWuqJ7IjQkReFcYGV/d+DddA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5941 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang finds and warning about some uninitialized variables. Fix these by initializing them. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/cgroup/test_zswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index f0e488ed90d8..6aac80eadc5d 100644 --- a/tools/testing/selftests/cgroup/test_zswap.c +++ b/tools/testing/selftests/cgroup/test_zswap.c @@ -257,7 +257,7 @@ static int test_no_invasive_cgroup_shrink(const char *root) { int ret = KSFT_FAIL; size_t control_allocation_size = MB(10); - char *control_allocation, *wb_group = NULL, *control_group = NULL; + char *control_allocation = NULL, *wb_group = NULL, *control_group = NULL; wb_group = setup_test_group_1M(root, "per_memcg_wb_test1"); if (!wb_group) @@ -342,7 +342,7 @@ static int test_no_kmem_bypass(const char *root) struct sysinfo sys_info; int ret = KSFT_FAIL; int child_status; - char *test_group; + char *test_group = NULL; pid_t child_pid; /* Read sys info and compute test values accordingly */