Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp773687lqo; Wed, 8 May 2024 14:42:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlWt3yVkTpjTLnUAZKi7x/AgeDueRTUGp+A/TEWnUBxf+8aFqh8JPyT2CsQhbl1LlOyvD85mmuMgAXEgV7CG7pInamacfP74eJkohsdQ== X-Google-Smtp-Source: AGHT+IH273eTVnc2YxfQKD1JrRuAGM3weSqootFVrzXuIsAbWgWlEB2GljtFB3pN5umrbG3axrn4 X-Received: by 2002:a17:906:e297:b0:a59:a7b7:2b9e with SMTP id a640c23a62f3a-a59fb94b8d7mr217752966b.8.1715204537045; Wed, 08 May 2024 14:42:17 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a179463basi4150066b.126.2024.05.08.14.42.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 14:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=CPOu9RYl; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-173852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173852-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9CC2F1F2132B for ; Wed, 8 May 2024 21:42:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0416B1332AA; Wed, 8 May 2024 21:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="CPOu9RYl" Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2066.outbound.protection.outlook.com [40.107.95.66]) (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 D717284D2D; Wed, 8 May 2024 21:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.66 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715204507; cv=fail; b=fOrhpvi1zbquS00TukRpgL4Ofg73Jf74Pa6140E6vvc212BxETy1JQAeRULq46twDfBS3ZdWoSIsSgi79+iikmTYirhTNIe2UpMEbiR8D0r2REkjxPEeR7zuCI3W6u8vE/6hIgwZXXgWPLDTg9k5j5YTP376My++x4qwgLD3Tlw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715204507; c=relaxed/simple; bh=boXRx/eTzdZbhfU+DSXAduXQYT/PbU2cb+8dejAlLNA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=lCQZjgQ+6JbbAbheXIHfvhNrZ93MHy0ve9K87B0yHOjqE3wv01oFq2bpmEGsptbyaGSnuUS5m/v8/8GaGiW4FuM2AsmZ+jcX30urwwa7vE5zkOEjNFTYFokQooTLmmH5nRMSQiaKqfCFhO2tDdKNVL0Yp0xm14U2JHzBAgvFPQo= 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=CPOu9RYl; arc=fail smtp.client-ip=40.107.95.66 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=S8zf/FVGRWen7PRaUCBM5liAeFWpqbSa8QQj4QV+mCGD0njRN0Z9vLWVsQ0AK2atGchtg5ESQcA6NBa7vrMPpZHiOxg2d+ZNQlVOyQmLNfNYyy0P3yTBKknqsPyxD6IDvkYtbKf8iVkogTWZ7kMc1avdSFdO1uRScgo8upaKEUHX3zXNqMGeXml8QtbYNASgXO5usJmWhunQgCSyjNfAkvi+FXM71MN104nyQN7b3oR3HqQddvvCjyqpwt+AtI+IfGgZd8x4r/WoYHyPGNy4OqRl4qyC8GqC5SqjFn4n+/0eNWHCM6xonTgwE54qE4Nn9ePWt3TwLDkutGDVF4QMlA== 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=dlIIGAQPcZzV1QVj1fLa7XKdLklbquz2YLOJaUUAhSk=; b=mLVHLm/i33VmB9E+aHcKN0vnXh5lP11IXxfQS4aqaNb3n9XBEz3QhN63D6Bv5T/8RkzDWVY0X2mnVpNL5Md95Eb8PRNUBxdXihdZYhrjTc7t59XaQ9kOoSjqDFyUWHahxh6weyA8r3jtNtMEANjXAFrMAvwixWBZjr3aj/TmkDZiDtvPQECfNWIzzxfxX8BG7OPnYzxsT9+/vWAajUikAQGsmilaDBAkbKPC2REGf9jbsy7n2K2tTD67xaMQxKaKdO0DEX3vbm1KInH2B7wktrxgToB5cDj6WybTygL/+K0E6M2Tc8ijrpLQHhy4i8H1rt3Le5MkuAESmEM9Bmlb4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dlIIGAQPcZzV1QVj1fLa7XKdLklbquz2YLOJaUUAhSk=; b=CPOu9RYla9pE7q2ifNAvOpS3IFRZ0a72Z2VrkGuBvc+KJa/RX1Hp85laDcQ5E4QN2NU9Kn/BJ8MaeLSBjsE6Mz9G89ckhDKaL1IRCJlEOcoJolhdNfTi0z7CETrVx2xJAQPwHmbKv6awqrjc+9MdRICJ9/77OvOC/8UPcYHSaymXdXUA3Pn9exxEeUfOKHQmUSQUzvMCEZHQCmaFEpbl/m5+r5aD8Gx+Aa7PDLDpstTIL6ySxdw2ZOCjYY7fZilkYSrSw/HQ3E9jidS4rNzaaEnX1hmbzp1eTN6TzONhNYmR4q5aS3BeHf9rYq5nRI+wxQ1Zb3cJBgejMl1BbmZ9Rw== Received: from BN9PR03CA0301.namprd03.prod.outlook.com (2603:10b6:408:112::6) by PH8PR12MB8429.namprd12.prod.outlook.com (2603:10b6:510:258::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Wed, 8 May 2024 21:41:41 +0000 Received: from BN1PEPF0000468D.namprd05.prod.outlook.com (2603:10b6:408:112:cafe::9b) by BN9PR03CA0301.outlook.office365.com (2603:10b6:408:112::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43 via Frontend Transport; Wed, 8 May 2024 21:41:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN1PEPF0000468D.mail.protection.outlook.com (10.167.243.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Wed, 8 May 2024 21:41:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 May 2024 14:41:24 -0700 Received: from [10.110.48.28] (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 8 May 2024 14:41:22 -0700 Message-ID: Date: Wed, 8 May 2024 14:41:21 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile To: Edward Liaw , , Mark Brown , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon , Nhat Pham , Johannes Weiner , Christian Brauner , Eric Biederman , Kees Cook , OGAWA Hirofumi , Thomas Gleixner , "Ingo Molnar" , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=C3=A9_Almeida?= , Jiri Kosina , Benjamin Tissoires , Jason Gunthorpe , Kevin Tian , Andy Lutomirski , Will Drewry , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , "Sean Christopherson" , Anup Patel , "Atish Patra" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , "David Hildenbrand" , =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Paul Moore , James Morris , "Serge E. Hallyn" , Andrew Morton , Seth Forshee , Bongsu Jeon , "David S. Miller" , "Eric Dumazet" , Jakub Kicinski , Paolo Abeni , Steffen Klassert , "Herbert Xu" , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Matthieu Baerts , Mat Martineau , Geliang Tang , Willem de Bruijn , Fenghua Yu , Reinette Chatre , Mathieu Desnoyers , "Paul E. McKenney" , Boqun Feng , Alexandre Belloni , Jarkko Sakkinen , "Dave Hansen" , Muhammad Usama Anjum CC: , , , , , , , , , , , , , , , , , , , References: <20240507214254.2787305-1-edliaw@google.com> <20240507214254.2787305-4-edliaw@google.com> Content-Language: en-US From: John Hubbard In-Reply-To: <20240507214254.2787305-4-edliaw@google.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468D:EE_|PH8PR12MB8429:EE_ X-MS-Office365-Filtering-Correlation-Id: ea344455-08c6-4345-a4cd-08dc6fa7a5ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|376005|1800799015|36860700004|82310400017|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?R3dVQ0IxTC8zai9PQVhRRkY1blk4YS93SHdROTNXTXBWd1VIWlRsb2ZsdlRt?= =?utf-8?B?ZGRVbGpMMGJmN2Y3bjlNRzBOSXBQOHV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2luTmVh?= =?utf-8?Q?TexE0MEIDVlz2?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(36860700004)(82310400017)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 21:41:41.1993 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea344455-08c6-4345-a4cd-08dc6fa7a5ee X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF0000468D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB8429 On 5/7/24 2:38 PM, Edward Liaw wrote: > Add KHDR_INCLUDES to CFLAGS to pull in the kselftest harness > dependencies (-D_GNU_SOURCE). > > Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/alsa/Makefile | 2 +- > tools/testing/selftests/arm64/signal/Makefile | 2 +- > tools/testing/selftests/exec/Makefile | 2 +- > tools/testing/selftests/filesystems/overlayfs/Makefile | 2 +- > tools/testing/selftests/hid/Makefile | 2 +- > tools/testing/selftests/nci/Makefile | 2 +- > tools/testing/selftests/prctl/Makefile | 2 ++ > tools/testing/selftests/proc/Makefile | 2 +- > tools/testing/selftests/riscv/mm/Makefile | 2 +- > tools/testing/selftests/rtc/Makefile | 2 +- > tools/testing/selftests/tmpfs/Makefile | 2 +- > 11 files changed, 12 insertions(+), 10 deletions(-) Hi Edward, Seeing as how these all include lib.mk, and all use CFLAGS, is there any reason not to simply fix this in lib.mk instead? Like this: diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 7fa4a96e26ed..df72610e0d2b 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -170,6 +170,8 @@ clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir) CFLAGS += $(USERCFLAGS) LDFLAGS += $(USERLDFLAGS) +CFLAGS += $(KHDR_INCLUDES) + # When make O= with kselftest target from main level # the following aren't defined. # thanks, -- John Hubbard NVIDIA > > diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile > index 5af9ba8a4645..9a0ef194522c 100644 > --- a/tools/testing/selftests/alsa/Makefile > +++ b/tools/testing/selftests/alsa/Makefile > @@ -6,7 +6,7 @@ LDLIBS += $(shell pkg-config --libs alsa) > ifeq ($(LDLIBS),) > LDLIBS += -lasound > endif > -CFLAGS += -L$(OUTPUT) -Wl,-rpath=./ > +CFLAGS += $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=./ > > LDLIBS+=-lpthread > > diff --git a/tools/testing/selftests/arm64/signal/Makefile b/tools/testing/selftests/arm64/signal/Makefile > index 8f5febaf1a9a..ae682ade615d 100644 > --- a/tools/testing/selftests/arm64/signal/Makefile > +++ b/tools/testing/selftests/arm64/signal/Makefile > @@ -2,7 +2,7 @@ > # Copyright (C) 2019 ARM Limited > > # Additional include paths needed by kselftest.h and local headers > -CFLAGS += -D_GNU_SOURCE -std=gnu99 -I. > +CFLAGS += $(KHDR_INCLUDES) -std=gnu99 -I. > > SRCS := $(filter-out testcases/testcases.c,$(wildcard testcases/*.c)) > PROGS := $(patsubst %.c,%,$(SRCS)) > diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile > index fb4472ddffd8..15e78ec7c55e 100644 > --- a/tools/testing/selftests/exec/Makefile > +++ b/tools/testing/selftests/exec/Makefile > @@ -1,7 +1,7 @@ > # SPDX-License-Identifier: GPL-2.0 > CFLAGS = -Wall > CFLAGS += -Wno-nonnull > -CFLAGS += -D_GNU_SOURCE > +CFLAGS += $(KHDR_INCLUDES) > > TEST_PROGS := binfmt_script.py > TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular > diff --git a/tools/testing/selftests/filesystems/overlayfs/Makefile b/tools/testing/selftests/filesystems/overlayfs/Makefile > index 56b2b48a765b..6c29c963c7a8 100644 > --- a/tools/testing/selftests/filesystems/overlayfs/Makefile > +++ b/tools/testing/selftests/filesystems/overlayfs/Makefile > @@ -2,6 +2,6 @@ > > TEST_GEN_PROGS := dev_in_maps > > -CFLAGS := -Wall -Werror > +CFLAGS := -Wall -Werror $(KHDR_INCLUDES) > > include ../../lib.mk > diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile > index 2b5ea18bde38..0661b34488ef 100644 > --- a/tools/testing/selftests/hid/Makefile > +++ b/tools/testing/selftests/hid/Makefile > @@ -21,7 +21,7 @@ CXX ?= $(CROSS_COMPILE)g++ > > HOSTPKG_CONFIG := pkg-config > > -CFLAGS += -g -O0 -rdynamic -Wall -Werror -I$(OUTPUT) > +CFLAGS += -g -O0 -rdynamic -Wall -Werror $(KHDR_INCLUDES) -I$(OUTPUT) > CFLAGS += -I$(OUTPUT)/tools/include > > LDLIBS += -lelf -lz -lrt -lpthread > diff --git a/tools/testing/selftests/nci/Makefile b/tools/testing/selftests/nci/Makefile > index 47669a1d6a59..bbc5b8ec3b17 100644 > --- a/tools/testing/selftests/nci/Makefile > +++ b/tools/testing/selftests/nci/Makefile > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0 > -CFLAGS += -Wl,-no-as-needed -Wall > +CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) > LDFLAGS += -lpthread > > TEST_GEN_PROGS := nci_dev > diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile > index 01dc90fbb509..1a0aefec9d6f 100644 > --- a/tools/testing/selftests/prctl/Makefile > +++ b/tools/testing/selftests/prctl/Makefile > @@ -6,6 +6,8 @@ ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > ifeq ($(ARCH),x86) > TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ > disable-tsc-test set-anon-vma-name-test set-process-name > + > +CFLAGS += $(KHDR_INCLUDES) > all: $(TEST_PROGS) > > include ../lib.mk > diff --git a/tools/testing/selftests/proc/Makefile b/tools/testing/selftests/proc/Makefile > index cd95369254c0..9596014c10a0 100644 > --- a/tools/testing/selftests/proc/Makefile > +++ b/tools/testing/selftests/proc/Makefile > @@ -1,6 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > CFLAGS += -Wall -O2 -Wno-unused-function > -CFLAGS += -D_GNU_SOURCE > +CFLAGS += $(KHDR_INCLUDES) > LDFLAGS += -pthread > > TEST_GEN_PROGS := > diff --git a/tools/testing/selftests/riscv/mm/Makefile b/tools/testing/selftests/riscv/mm/Makefile > index c333263f2b27..715a21241113 100644 > --- a/tools/testing/selftests/riscv/mm/Makefile > +++ b/tools/testing/selftests/riscv/mm/Makefile > @@ -3,7 +3,7 @@ > # Originally tools/testing/arm64/abi/Makefile > > # Additional include paths needed by kselftest.h and local headers > -CFLAGS += -D_GNU_SOURCE -std=gnu99 -I. > +CFLAGS += $(KHDR_INCLUDES) -std=gnu99 -I. > > TEST_GEN_FILES := mmap_default mmap_bottomup > > diff --git a/tools/testing/selftests/rtc/Makefile b/tools/testing/selftests/rtc/Makefile > index 55198ecc04db..654f9d58da3c 100644 > --- a/tools/testing/selftests/rtc/Makefile > +++ b/tools/testing/selftests/rtc/Makefile > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0 > -CFLAGS += -O3 -Wl,-no-as-needed -Wall > +CFLAGS += -O3 -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) > LDLIBS += -lrt -lpthread -lm > > TEST_GEN_PROGS = rtctest > diff --git a/tools/testing/selftests/tmpfs/Makefile b/tools/testing/selftests/tmpfs/Makefile > index aa11ccc92e5b..bcdc1bb6d2e6 100644 > --- a/tools/testing/selftests/tmpfs/Makefile > +++ b/tools/testing/selftests/tmpfs/Makefile > @@ -1,6 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > CFLAGS += -Wall -O2 > -CFLAGS += -D_GNU_SOURCE > +CFLAGS += $(KHDR_INCLUDES) > > TEST_GEN_PROGS := > TEST_GEN_PROGS += bug-link-o-tmpfile