Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp336900lqo; Wed, 8 May 2024 00:52:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzOmjwugBBtvY6adWLzno14jSiO4+kDwhjBxsZ+IZzSgEe0gkL+Igc9Ki2JH7VFsnRztu2Tj8afFkiBJvvn9dtzEpWWPzDJkpLoJE07g== X-Google-Smtp-Source: AGHT+IHuZAghJhmCCemQp83/hGNHncNmIuI2i6Qk0evxDB+FmFQYJb5ir+PfsYlLli6jNoTQVBXr X-Received: by 2002:a05:6a20:2455:b0:1ad:85c1:2d21 with SMTP id adf61e73a8af0-1afc8d60885mr2346801637.8.1715154727332; Wed, 08 May 2024 00:52:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715154727; cv=pass; d=google.com; s=arc-20160816; b=nOHKSREgO3my8TiHz7OcfuCcXGpLJcPlY+P3tDNgjr35ox5FJZ4a3JbA8QTavH1XBu VqahmWjFyW/08azZnhnMEQwiSq4QwJ5LplaDEYRCvFwgD/NKhV2aWhx7QcjA0mubEXEF 4iHIO+4g9AtNLW2R2YKRmexJSmXn8wXniaKG8eTtgL2Oo6ZzrvKKANU5lQnuykcupP/H RiYoCen2ht3zV89Z4AAdyej3fz+68P40utpjU+mm3gmHftDaBXJKwRKePm5BT9SOByeZ WCqRayAtPms0/as5fWqVqFpCF38DH3kjQTF+HurRge8tHyEjOJXOoX2cDI+w4QWznrqV Q5qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=HDiyT/vG++eQsq88B4/5UyaBvnnLoUm0K+kXEVjlnrU=; fh=IcLcGq7ZwANlR+jgSRPfhUta/q2PlNpym19Q+9YQ9xg=; b=JB7ff6MHCD3AgStU1qT9XDkm+BUWpFm1HMJ5F5pCQ78IMZhg48crnPUnDiUBbyrADL hx00bo6fv/AlGYfnVCPXU/MukOnbz+RLn99XFXI6cv6+dBs4h2iwwUTtTDTvPUufzaYD sE3opTzwIgrWYnRfewwWpAv/v1YgTj0bEAzL7kQp7iP3P+vs/by5qlBhdgkVCSKHQV0E zErSZI98gG3r6diL7qgQuQySDhZfOjjRF6ucqW6tDM1k1/1jGiqHiliksocPQY5CyjtH 80hfF/iyFh8z/FmcjNsHT0VsiJVoHZF+ZLg5dhmsbjRdzvhWC1fdld/7ymnQTCdDWJ50 xn+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TyCeEKfi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-172860-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea72e8si853066a91.100.2024.05.08.00.52.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172860-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TyCeEKfi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-172860-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EBA7528146E for ; Wed, 8 May 2024 07:52:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70F345338D; Wed, 8 May 2024 07:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="TyCeEKfi" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 76D6E3E493; Wed, 8 May 2024 07:51:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715154663; cv=none; b=bAuVM5SdF7sMbqTKAmVfDc1H5DMIwa8347TqyZg3VX/tSlLWxnCva17JL97kQKQY2v/WpQOOTthD36m35Vtz6DRYl7IrFF0cfj0p3kCqwi+zqlAz0pRlIuqG8jQh0CKsiY7KHqTnhgwf+YYD6MJlVzfVIk+PqxlTtP7+SE9n9zU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715154663; c=relaxed/simple; bh=ER1Z4aI2riqIkflza4C4e1PlWp6zX494INQCy0XREMI=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=jVYvRPy4Jm/8Qly0IrAVG8f4yvgrbYPdUOgv0xVo9VAwLGDTi8hwgjKc9nT8f3aM5feChXAQeu1Ykk7J0lNen81+V9H9Zjd7+gFAxZDpjgkp4pDqeq5he5VeLUBV5Of/xdvFm0rvXlIDDSHu43a/18Qq8gjokRT43xmnrdsBObU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=TyCeEKfi; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1715154660; bh=ER1Z4aI2riqIkflza4C4e1PlWp6zX494INQCy0XREMI=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=TyCeEKfi6CYhIwEaqOEpH25jFs6qvBUVq945IAEJX0ygECWU589cyU+MvgoMTwPux 6/BdQxBfA97+L51tiYYuC6Z019EIYhFF3sdDZuG2WVBm/WaUFyhWfjl8go6V74ihZL zBcgP46R18osAyST9mJimRCt5HPROCQi3DU7kLTMECfOKz73i5JJsM6E5KBVualcXQ 5gzkdSfbaSw8tyRODR4he2DEGEVliGska4eIsPBcU5tlE50l57QHTt63UZ0CRXcg2U D0N9WjN6eZpiBY81Z85YXE8KEKC/rooS7M1+Qvq169eoVStaDUIn3LxqthwG70lAAM pCsLg40TYView== Received: from [10.193.1.1] (broslavsky.collaboradmins.com [68.183.210.73]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 7EA2C378216D; Wed, 8 May 2024 07:50:16 +0000 (UTC) Message-ID: <9b54b87f-f761-4e4f-8df3-993e426ebc27@collabora.com> Date: Wed, 8 May 2024 12:49:58 +0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-input@vger.kernel.org, iommu@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-actions@lists.infradead.org, mptcp@lists.linux.dev, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile To: Edward Liaw , shuah@kernel.org, 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 References: <20240507214254.2787305-1-edliaw@google.com> <20240507214254.2787305-4-edliaw@google.com> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <20240507214254.2787305-4-edliaw@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/8/24 2:38 AM, 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 Reviewed-by: Muhammad Usama Anjum > --- > 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(-) > > 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 -- BR, Muhammad Usama Anjum