Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp130985lqo; Tue, 7 May 2024 14:46:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYsHaV6OPwi+1Sa65BAKFwA0TF6xhJQ1F+/c9Kx6TqKSvF3BsxwZQGN75nRdqcR0Je08o9YhCDDRZQXASs8z2EH/InEueC0Gxlk0BY1A== X-Google-Smtp-Source: AGHT+IHNuocG3aGl0xydCL0Lw7uOyzlHXs8laLBRMcqzDAlCbihp0hJe7air/fD9j6wgqPVR1ias X-Received: by 2002:aa7:815a:0:b0:6ed:8aa9:4783 with SMTP id d2e1a72fcca58-6f49c208fdfmr1014078b3a.13.1715118411442; Tue, 07 May 2024 14:46:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715118411; cv=pass; d=google.com; s=arc-20160816; b=KxEmPCTiklrjA0/BbS7n8e73NM9ToIl5qtwuQrDwSXbJjhzkseU+bk2J/EWFKKahH0 6y6M1CtwkFwZ6Fj6dfd1OGbOiVhxGua+4DZ1p+xhGbAAL0FxfA/n48KKwJz978cqVcua WngXWSdhYhsW3pX4g+B/xNp/ejf1J3A32vLAsm7mfq/s1EVifnonBFCoNNMU5P6zrD6J G8wiMhSbH712VQPhkmiyf7cb8FqtphotjL6Z9sY4JUi4hgM6VvA5taXSNv/6sFD8N+st ydHxA1wTyfrWjQVVVfYVGtIhDZRz0gMD3OCXVMF1CNWXdKRIcoWnOuMg5gDjHtWkZ2UK rMZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=DviObgEc5the5KsTWi1wuA8Jrbq5crnmfaITqe27r7c=; fh=U8gRD2fgXQXecyrh0lwm2my7Y9ltA49meS4xHt6+P9Y=; b=US2LcIC7k8ze72FyHFrvzG75IkyKJRBnOAFwNW9NAU3QSi5wiW8Hne9DGjWeUskBag ISYJxgTukGbtUHLUHFadsFg6KAuPfslV8mABFyiwsPmhoLccTlu0tRpPOPDflj4VBJjr uHtPm/5ljRkRy5kbQQAJvn6VvkA4RkpVYrDj+1liW3h2AEr1fW+9Q/0RLzjgDKmuBSCK tZuWjZZ3SQ6t5UWV+5/4nV+CWRrK6Kxx7uec8u55ADrWCR70mofNdnPnAsi+37g067TR NVA2gUHwX2FYQBiJ5btlCwAszoP0rQFkzvyazIZ5nOfSn3Hi4yE+pL7Mgtu1QwzYRztn O88g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qbCt4CZ+; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-172227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g20-20020aa78754000000b006f393b0ffabsi9910712pfo.339.2024.05.07.14.46.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 14:46:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qbCt4CZ+; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-172227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 E8BDF283274 for ; Tue, 7 May 2024 21:46:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB93815ECED; Tue, 7 May 2024 21:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qbCt4CZ+" Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 CCF3F78276 for ; Tue, 7 May 2024 21:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118379; cv=none; b=WAAN5opISxoq96GpFWG3RpI1PlJ3Gv1IN0bSwwjvr79qUyONVDN24h9LFFAiyaylZf3lhkly/g00x0Rggj5UJpuVDWmtZz8PjbjtlbWUpBkCEIo1ONOoCanCdpvdr+YJS403E4JNtqnxzUKljJxfIVj5v0ZGkkApbU0Yl9d5d7A= 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=qbCt4CZ+; arc=none smtp.client-ip=209.85.216.73 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 Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2b2a8bd5ee0so3037936a91.2 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=vger.kernel.org; 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=qbCt4CZ+bklyFSSW9hAZzEVD2hb+vUYovoFB6mo9TyF0prG9XbU9PPK5EhkJkasbra mYel77QzyGlU5cP+fICfhmbZ0eZ1b2mAFWOjxJyiv+cGqMoJ9Zjgqd3l6wUsfbVtxSjm SMRu6XHE2DIcc65kRWrRKaNRHK/V0ySJvCP7Mux2gcnpg+Lie7ckHLVZaO5cMU2oHDLr uFh6VIstiCfI/MwNref+XdABr0ZP69AFzsvI2A3rk0+E+QjVRMgEOFDCS9vI/fxFkoqk Tsh3Zs6tHNtCH+2ejoIrStJx722szFv09p4JIyryIzZyy9xbJJEAVR/SM7Cv+itpwoZm nFdQ== 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=inDJAUK4V2w2jr5kxty9Cztd1e6nCyEdtoN5PLiwkegOr1DQhvqSrlWSXOR8H8gfIW zMec3eWfWwX2AEhhgmLk6Ny3JW0r050/VGvIvtHxAAh9QPqe1OPJYmO1Vncb5B6M3BOk 0MPEyEKSPkrKW8CdaAxBEl9euFdf8U3FoT7XRZEibMMP1JcXWIrtI8PdE+mgJYy0F2H0 YDBN3fYV7f1B74tSn1tFsYQygvnk5lsprvcfebzMJd0Gx3VEfeQal+wpAurW4mrXAJa6 V0jKL+W3EHhkOg9ta6PTarDTZZAT3MTsnfW0mGS1VZGLrH//cgtMNNbDcJYhzc6poVxx kIXw== X-Gm-Message-State: AOJu0YyTH6U6CMgo0IQFDzqYhCGI/lET3IW3anDlrEWLN686FC0ATZnl P/l8B/R+3xE/V6nh7OS+EI3E+s5YyqUsu8Udr47d7oJLNi5A4dkt4/Fw2VKO49ZBOhFb0Hx/dbU 17A== 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: linux-kernel@vger.kernel.org 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-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 --- 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 -- 2.45.0.rc1.225.g2a3ae87e7f-goog