From nobody Wed Dec 17 07:32:21 2025 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA7CD7317E for ; Tue, 7 May 2024 21:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118379; cv=none; b=NINhprzDhdMrYGd26ShF/osb34YAAoR+UBjntdBWwm5Vwc0pp1hKFoXd4PEO/l8G6uY5gw5f3AEwBXa7nFsHxmiZqP1vEWJbi43M3UnC8oLxFyIae6PpT3GmeSHB7bNq5Ho8/jai/y710UOjC1lSt+Wp9lM1V47JJyphzadufsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118379; c=relaxed/simple; bh=GVSC37q+WVUBvHotgiC9ngmMYaMRXiMQyXyyILui2QY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=T7qs2hrHxXAwvHFKyzZJFNGG9ju4RGMT5bQUsmoPZgOBcrk+nlT+fJ0ZP2zTwjP+BNTfIREV2yOXze7K3L6cvEdBOjJnPi30WHYASsDukAVNxyBBqC8l/4W+3uA29Br5koc4MhoRaaCG90WunkgjPTQE7xXBGujfXQY/nmssPIg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xIFh5TwZ; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xIFh5TwZ" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2b432dfdcf6so3036470a91.3 for ; Tue, 07 May 2024 14:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715118377; x=1715723177; darn=lists.linux.dev; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=DviObgEc5the5KsTWi1wuA8Jrbq5crnmfaITqe27r7c=; b=xIFh5TwZcwL08fE7qSIqK8Kd37o/EBLszpQQCvlfbYC94f2vPB8PqpY7XsDT+rsq1S a8GEbwC1DBWbT/VBLCAEzueTLqFeC9jTlXannt9DbmEgtBvIkCP6NDct3JgHjz1IS8ij nP6/oiTHbwvF1/WYfsDxGql9kPuEY1vGmOWbiMj7QOofxy8sjYaeiupWtp350eccGCQ5 DpxmOnWFFUra2dz0+cpE1KN8ic5LFU8PyocP832UGV9BDAO6pEK8pElvqS7Ds5zzhIYZ 7OwvSO7Zr1/PD124lwExhcF1oDCriOZKYk80lKLy3NpzSzRca9HPdojvJSgpQgiek5Bz /8UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715118377; x=1715723177; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DviObgEc5the5KsTWi1wuA8Jrbq5crnmfaITqe27r7c=; b=SKwoBBzEu8oGGP2p0yetXd2VhX0Ow22r8qfPYSQ3O7uvz356RnYlOL1prNz8+ifQTb FdzKptpgouXBMMNsItCmH7DdVflZolAD5S1Kn06bDyu3abf9spx1nFu0mhZMcjYWAqGU YAwKV/BpJLfdMP8kflovleiPm+CsP/l5nFfMA9hdFwSze01JBd1biDbC329+bAcsin8z E4myHhZFUYx5Zxys63n5iJBeYl1IkkpQs58gRvTqYm4Ba8CYDkVy8BFZnil+Cp5jV33I dKQltD84kiOB1jxgrr+npp5MECmDLqocJgyh48Sb5yx6AMvAncH/kxlzUCAR4VbWe+ad BGyQ== X-Forwarded-Encrypted: i=1; AJvYcCXxkGuxsFLItL2NMlls/49nubSIquW6YpPUJMoXObBh11mqWew9LZew7zfHCGA+7rms/WEgJonPUe516RIGdV4DLpwEXFY= X-Gm-Message-State: AOJu0Yz3wlfYKKPBjb5K925zId3E29eLhM92ddxh1JYT5wasPo7egQmH jeVsJ8zgnQ/4GGHCeSZqJInXqLcxu5CdINkwwbBQttzM/i2owxjXxrYSAW/dmBTj7RkB/63KGMK cfw== X-Google-Smtp-Source: AGHT+IEulH29x3uOVFbknFwsLl4WcM9naThMz9i2Ajy3QsMZqnbNUGap0hB8s9HU3OrwMNMNVbdGuRXxZUs= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a17:90a:5913:b0:29b:c2b7:7d29 with SMTP id 98e67ed59e1d1-2b616ad9f91mr3776a91.9.1715118376985; Tue, 07 May 2024 14:46:16 -0700 (PDT) Date: Tue, 7 May 2024 21:38:28 +0000 In-Reply-To: <20240507214254.2787305-1-edliaw@google.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240507214254.2787305-1-edliaw@google.com> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240507214254.2787305-4-edliaw@google.com> Subject: [PATCH v2 3/5] selftests: Include KHDR_INCLUDES in Makefile From: Edward Liaw To: 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=20Almeida?=" , 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=20Sala=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=20F=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 , Edward Liaw Cc: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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: Jarkko Sakkinen 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/selftest= s/alsa/Makefile index 5af9ba8a4645..9a0ef194522c 100644 --- a/tools/testing/selftests/alsa/Makefile +++ b/tools/testing/selftests/alsa/Makefile @@ -6,7 +6,7 @@ LDLIBS +=3D $(shell pkg-config --libs alsa) ifeq ($(LDLIBS),) LDLIBS +=3D -lasound endif -CFLAGS +=3D -L$(OUTPUT) -Wl,-rpath=3D./ +CFLAGS +=3D $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=3D./ =20 LDLIBS+=3D-lpthread =20 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 =20 # Additional include paths needed by kselftest.h and local headers -CFLAGS +=3D -D_GNU_SOURCE -std=3Dgnu99 -I. +CFLAGS +=3D $(KHDR_INCLUDES) -std=3Dgnu99 -I. =20 SRCS :=3D $(filter-out testcases/testcases.c,$(wildcard testcases/*.c)) PROGS :=3D $(patsubst %.c,%,$(SRCS)) diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftest= s/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 =3D -Wall CFLAGS +=3D -Wno-nonnull -CFLAGS +=3D -D_GNU_SOURCE +CFLAGS +=3D $(KHDR_INCLUDES) =20 TEST_PROGS :=3D binfmt_script.py TEST_GEN_PROGS :=3D execveat load_address_4096 load_address_2097152 load_a= ddress_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 @@ =20 TEST_GEN_PROGS :=3D dev_in_maps =20 -CFLAGS :=3D -Wall -Werror +CFLAGS :=3D -Wall -Werror $(KHDR_INCLUDES) =20 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 ?=3D $(CROSS_COMPILE)g++ =20 HOSTPKG_CONFIG :=3D pkg-config =20 -CFLAGS +=3D -g -O0 -rdynamic -Wall -Werror -I$(OUTPUT) +CFLAGS +=3D -g -O0 -rdynamic -Wall -Werror $(KHDR_INCLUDES) -I$(OUTPUT) CFLAGS +=3D -I$(OUTPUT)/tools/include =20 LDLIBS +=3D -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 +=3D -Wl,-no-as-needed -Wall +CFLAGS +=3D -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) LDFLAGS +=3D -lpthread =20 TEST_GEN_PROGS :=3D nci_dev diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftes= ts/prctl/Makefile index 01dc90fbb509..1a0aefec9d6f 100644 --- a/tools/testing/selftests/prctl/Makefile +++ b/tools/testing/selftests/prctl/Makefile @@ -6,6 +6,8 @@ ARCH ?=3D $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s= /x86_64/x86/) ifeq ($(ARCH),x86) TEST_PROGS :=3D disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-= test \ disable-tsc-test set-anon-vma-name-test set-process-name + +CFLAGS +=3D $(KHDR_INCLUDES) all: $(TEST_PROGS) =20 include ../lib.mk diff --git a/tools/testing/selftests/proc/Makefile b/tools/testing/selftest= s/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 +=3D -Wall -O2 -Wno-unused-function -CFLAGS +=3D -D_GNU_SOURCE +CFLAGS +=3D $(KHDR_INCLUDES) LDFLAGS +=3D -pthread =20 TEST_GEN_PROGS :=3D diff --git a/tools/testing/selftests/riscv/mm/Makefile b/tools/testing/self= tests/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 =20 # Additional include paths needed by kselftest.h and local headers -CFLAGS +=3D -D_GNU_SOURCE -std=3Dgnu99 -I. +CFLAGS +=3D $(KHDR_INCLUDES) -std=3Dgnu99 -I. =20 TEST_GEN_FILES :=3D mmap_default mmap_bottomup =20 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 +=3D -O3 -Wl,-no-as-needed -Wall +CFLAGS +=3D -O3 -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) LDLIBS +=3D -lrt -lpthread -lm =20 TEST_GEN_PROGS =3D rtctest diff --git a/tools/testing/selftests/tmpfs/Makefile b/tools/testing/selftes= ts/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 +=3D -Wall -O2 -CFLAGS +=3D -D_GNU_SOURCE +CFLAGS +=3D $(KHDR_INCLUDES) =20 TEST_GEN_PROGS :=3D TEST_GEN_PROGS +=3D bug-link-o-tmpfile --=20 2.45.0.rc1.225.g2a3ae87e7f-goog