Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp112887lqo; Thu, 9 May 2024 14:26:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV97Uyld3AbpliACaKnsfDGoSlydsx/mtsiOUMMgjfdFaZzTP/fBfkQ0ARf9LC8CS2jWEUHXSFheVBqaMeNGLEI8B3jTRn1mNfPb0NvsA== X-Google-Smtp-Source: AGHT+IG4KAfOpyi/tYm+NgUKpvDuF5e489EnZ9vvS99DZjm5yArA4H0x7N910vhR+d3WB409IpJd X-Received: by 2002:a17:90b:3016:b0:2b3:28df:91e1 with SMTP id 98e67ed59e1d1-2b6cc3429cemr698269a91.10.1715290011511; Thu, 09 May 2024 14:26:51 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670f4cbf3si2267680a91.55.2024.05.09.14.26.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Z2qlZQth; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-174991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5EB0DB20BCB for ; Thu, 9 May 2024 21:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6148012839A; Thu, 9 May 2024 21:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Z2qlZQth" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060.outbound.protection.outlook.com [40.107.237.60]) (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 24166770FC; Thu, 9 May 2024 21:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.60 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715289952; cv=fail; b=sNiGVX21TW8jUnAeFxV4vPxnNjYKS1FKJQsoaJOUpI18woZWqyTtK0VE9BXFVejjfDJGDH8HVhZQS315AwxW4yGHV/7cSOEoD3t/mntBPJDhzd/WwifWkawJARbSX7UDNcRPTUknqSZKNPWnsnQ+NHmp2mrF36ZA+ErQro64JzY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715289952; c=relaxed/simple; bh=v/dPybCgGmAKbV+anGBEITVl229qwLNOXzGXtbdA4Fk=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=B8VdmX0oYAQum2DqJ1bcV+rhxjR30qnNswRN5S546SroUURc91yo26PVWTwF+5OyjhcPtMRXZFWdDOG+WsbRbXGG16lxb7+iDnGn5qNnPRB+l+gb6XPBWvvpbAOnIj3ZHedn9yeqoxw0jr4z0eRUwOEl0BoUoXRyEvOB1uhf8PQ= 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=Z2qlZQth; arc=fail smtp.client-ip=40.107.237.60 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLiOBCbq2UDTAPoGjOPspRoKtQD9MufIvlsYeUozFUjjOWR3wLxnSqJOciWKwhYiBiuqJ880H/uDHNewU/O7pEHMuI+XB3Jjf9k3sd64e0WRmNP+p6Lj/P4LbplxYzAaAVKr/K8TfEWWWRwho+KDk9NcBLlgY8x+lUbTylM0o1kjQAzkIMEPRhewgQ+5lmxxOIqWAv5HlhlcAZJDU48oXKii74osJdDewahnJaxKPxjABtJzw9l2jyBH2uf1mu1c52aTf3wZUOCe/5L3CFFTUr1dVihEM3gxa9O2FtNrHD7GwYqRGvGV8l1vCkQsqH3MSkCGCsm1dOY5Bx+kYRQbvg== 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=SO7EoBy7ZU/ewsoNcVo+CX5B4f7g+z7jQYIOjPWT3BA=; b=FpJruB/XDz6JGx7Kne4Pd16vmzTgh0Gx8+a23tdrIATF4bYg9vC+d/vCdT6V1rnC88KbcHYINpBIb331Z9PtDOuUEIc7X8GSJ7D4UnDck7x9MJgGfRodKnOV0lBaVX288tSKRPJ6DVYKNgI3Oxmg36xI5f+AQjs8K9YzybYEiOHn1UQHZJeS6EWVYLuXL8pwowMAITWMUEfx5MGzYw0TTWy6I2/9XICYUE2W02BhEUy6C2MIuBAmVGHPMlsgBAxar6ViHpRdZ2PwAPHdlrD9HOkSpO5EGTotFXdkMfFgvsjAWlWuimj7rV6u7usBxj3isG+EwYgNCERv8I8cRFKvpQ== 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=SO7EoBy7ZU/ewsoNcVo+CX5B4f7g+z7jQYIOjPWT3BA=; b=Z2qlZQthB0me7OLo3cLtXdtHoKweSFmAxhYamRoJuH6DNHjT6ANSZ2lUrj1evDiJyLeNH3A9grMuWr9zyhR5NJ0QSNZNR4yWkrBlO3LW9eOVnGvsfadFs2t+DE6n72Qv1evYNKO2GnkAh2oN76/Ad2i/AD8b8vPDSCVyl+I+pzsZODytaG32mIObTetsGKl9+fc2dQ1GYwDEf/1ms1pkwBNzYGnfMgmHOq5hiSyRBJUys3kVqvq8g8IBL2dao2geSLCksHXTLzt9NDAtR3Vf/6AB/AN3uvYQtMSyHIjZ5ESrQPSe3WfC3LMqrbgg2IwsV+pk1r9aHGeX+s6QGfa/Eg== 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 SA3PR12MB7830.namprd12.prod.outlook.com (2603:10b6:806:315::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.47; Thu, 9 May 2024 21:25:42 +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.7544.046; Thu, 9 May 2024 21:25:42 +0000 Message-ID: <0e196143-c0bf-4d70-9735-7e6d9a69ea8f@nvidia.com> Date: Thu, 9 May 2024 14:25:29 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 03/68] selftests: Compile with -D_GNU_SOURCE when including lib.mk To: Edward Liaw , shuah@kernel.org, =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , =?UTF-8?Q?G=C3=BCnther_Noack?= , Christian Brauner , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Andrew Morton , Muhammad Usama Anjum Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-security-module@vger.kernel.org, netdev@vger.kernel.org, linux-riscv@lists.infradead.org, bpf@vger.kernel.org References: <20240509200022.253089-1-edliaw@google.com> <20240509200022.253089-4-edliaw@google.com> Content-Language: en-US From: John Hubbard In-Reply-To: <20240509200022.253089-4-edliaw@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR05CA0067.namprd05.prod.outlook.com (2603:10b6:a03:332::12) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|SA3PR12MB7830:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cd2a724-fd9c-4157-621e-08dc706e94b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|376005|366007|1800799015|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TlZRWXlENHdzSk5KNkZvKzBkMjNTSUhIRDd3QnZlUDAzZ1ZiZzRlelY4UitS?= =?utf-8?B?SEd2Um8rMU5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R12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(366007)(1800799015)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WUt1RDVUS1QxbzJjYTloN0ZCcXFObExTTngzOEE1ajV2M2pLVUU2ZzE2TW51?= =?utf-8?B?RkFHVHlSOVRVWlg3NWhWbS8xSDcrbWl5QTdCcWcyZjBzeDVpa1dtRm8yenQ1?= =?utf-8?B?TGdhSmwxeS8zY1VJS1h2ZDNIQTBVcTZCUzVVZERVZFRtNTh5cVFQWnY2emVy?= =?utf-8?B?cXQ1R1BlV2pRTXF2cDFjNmFTRUJHZUxxamJOZ1F0TXZ3L1JoZThNemlaSGtr?= =?utf-8?B?MmRRUklIQjl1L1NoTnNtZWZZNzdpYUFiSVV2aDRIQmtJWWJQN25hLytPdTVZ?= =?utf-8?B?RjV3dmNIMDdhSUFaRjVJNHJobzViTnBkdDF6TGszM1NhWHNiaXEvUFZSOHFr?= =?utf-8?B?UlpERVRNaUJ2NG15WnRESkJ0VEZFMWJVdERLUURRa0lZa1lyek5ySlJkZ0gw?= =?utf-8?B?RWZub1I5TjBCWitGdExodGxtYmN3TGMvZXVQczlyZW0wR3BLeDV2QTlyT1Vl?= =?utf-8?B?STlSdmprU2d5NVRtVTRjT2d6Ui9MUWlrMGtjOUswdnlrY05oODg4ZGRFdFMx?= =?utf-8?B?RHE0YmtmWlhwQVlscmNhVG5laytpZWJscWxVVDRkdzJyWjkxNWRiV1ZYQkZr?= =?utf-8?B?bERjejhZbXByMVNCeUpJTzBMQlFvaGVjWUllbnpsMUFzUGo0QWJNNU5kVlJ1?= =?utf-8?B?bW9mSEVrUlc4ckttQzhyazZjNzJILzRteXJkVmFrczRYZzIrOFZzZ1NweFp4?= =?utf-8?B?VWdTTEpxbnFqU3BFbGE3R3RzL2pXaHlQUTkvMWowN3dmRUFLTWpIUnhjT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WY4eWNhUVZSNGlOQmYr?= =?utf-8?B?MVpkTk1adENTaC9abi9kVGF5T0taMXdOTms2czYrWmtmSHdtVVF2b1hVZlpu?= =?utf-8?B?S01sVHdvaHo3SHN3dWlPV0NraktzaWlPVjlqRHZZZGVrYXRJaXZOcUZ2bEZE?= =?utf-8?B?RVpQbW5aanJOUklTWkVlekN2SnVNeHVwRm8wYkRlN0drSWRFaWZBbzdyTUlJ?= =?utf-8?B?Nlh4dHR0MVJNbFh4Mkt5VXBPVHpFYjRwNWVCMGRJZksrVFF6OFFGM0pvbUlH?= =?utf-8?B?K0tJS1VsNzlSUUhQY0hwK253WUY5MFhMSTBUTGFCRlFHUVJ6OVhQMzd0Mncy?= =?utf-8?B?WXpQVnl3U0Z1dDkrV3JjVjVLWGNwN1U5Y2c2akZuVzVUdnhKclBwd291NCtu?= =?utf-8?B?ZENUbXp0MHhlZlhJTmRwVm9BNGZLdG9KbDFqajlQL1dFYllUM0k4Q01Hdmxt?= =?utf-8?B?ckdnRVNZenAwb09vU1NPa00vNG5XelFVUWR5UzBFS0plR0w2TnlzZWc0VVlB?= =?utf-8?B?d3c9PQ==?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cd2a724-fd9c-4157-621e-08dc706e94b5 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2024 21:25:42.4607 (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: vgDaSmE1h3q5zzKBnrYaUAaQAOrG4VG8WmUc5cpgNNqyOH6AdTisL+Yrq8dlXjGXwLjHUWYVbVQjSaKpChoHFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7830 On 5/9/24 12:57 PM, Edward Liaw wrote: > lib.mk will add -D_GNU_SOURCE to CFLAGS by default. This will make it > unnecessary to add #define _GNU_SOURCE in the source code. > > Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") > Suggested-by: John Hubbard > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/Makefile | 4 ++-- > tools/testing/selftests/lib.mk | 5 ++++- > 2 files changed, 6 insertions(+), 3 deletions(-) > Hi Edward, This looks good, with one small refactoring opportunity remaining, though: > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile > index f0431e6cb67e..9039f3709aff 100644 > --- a/tools/testing/selftests/Makefile > +++ b/tools/testing/selftests/Makefile > @@ -170,11 +170,11 @@ ifneq ($(KBUILD_OUTPUT),) > # $(realpath ...) resolves symlinks > abs_objtree := $(realpath $(abs_objtree)) > BUILD := $(abs_objtree)/kselftest > - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_objtree}/usr/include > + KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include > else > BUILD := $(CURDIR) > abs_srctree := $(shell cd $(top_srcdir) && pwd) > - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_srctree}/usr/include > + KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include As mentioned in [1] (but there are a lot of patches to manage here, and I think it got overlooked), you could factor out the duplicated -D_GNU_SOURCE items into a single place: [1] https://lore.kernel.org/all/ac8c217e-4109-4ca7-a7dd-fc4fc8b0a4de@nvidia.com/ thanks, -- John Hubbard NVIDIA > DEFAULT_INSTALL_HDR_PATH := 1 > endif > > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk > index 3023e0e2f58f..e782f4c96aee 100644 > --- a/tools/testing/selftests/lib.mk > +++ b/tools/testing/selftests/lib.mk > @@ -67,7 +67,7 @@ MAKEFLAGS += --no-print-directory > endif > > ifeq ($(KHDR_INCLUDES),) > -KHDR_INCLUDES := -D_GNU_SOURCE -isystem $(top_srcdir)/usr/include > +KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include > endif > > # In order to use newer items that haven't yet been added to the user's system > @@ -188,6 +188,9 @@ endef > clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir) > $(CLEAN) > > +# Build with _GNU_SOURCE by default > +CFLAGS += -D_GNU_SOURCE > + > # Enables to extend CFLAGS and LDFLAGS from command line, e.g. > # make USERCFLAGS=-Werror USERLDFLAGS=-static > CFLAGS += $(USERCFLAGS)