From patchwork Tue May 7 21:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 1932654 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=f93BV7Ia; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=vL77BIDA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VYsKv5kvZz1ymg for ; Wed, 8 May 2024 07:46:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=oOpufy/PxH9rEnTP2X8OnffNS2EnP/yn8ERZRvMzrVw=; b=f93BV7Iao5aoFaYXIDQdoecsnV V2yrmE3i/K1W/HTBV6GtIQHPYq8ukDLgJL63iwxX8I6LkhsHJgaeIBVATg/X4ct/iyKlAtHDKxZNc ljHINlBLrmbeRJRmyLNBzREvz/wAj9T1Y5MvNrAe5HfgURhx4gUlLUie1BS/xY3DUTZP4kNehQ3K5 Q2XXaNMHhmA+jtA4c/EwtBIdRcM3mG2KGC50K2sJT/5p5wFzPAF9gMZMv2YgWigWH5sN6d7lU1oJV GDeNueTaWkJ1EH5BMbLlM9ctbHg7FYnDtCkFZaAl4MkbERnjomLzUwuuhnaLnQAbmFSg2mSjUnMip E7oZdnqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Sdm-0000000CwVY-2K9g; Tue, 07 May 2024 21:46:26 +0000 Received: from mail-pj1-x1049.google.com ([2607:f8b0:4864:20::1049]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Sdh-0000000CwRO-0qch for kvm-riscv@lists.infradead.org; Tue, 07 May 2024 21:46:22 +0000 Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-2a49440f7b5so3044286a91.1 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.infradead.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=vL77BIDAntLaQ4IPkFD3awt9Oq+zWPrcKLn83NX7pBhd4OVvFgBSjmNcByPmmjaGFZ m6rVB8qJI2AmsrRZYkyXCgtyeAfTyBj3Y0sIlVe+vtxE2fqEVK+Ah4Hb+I6IHhV7IAGm V+DSla045WVsDniE1of/E+U4+aW9yQu5MGw54wzCNQ1JVHci/3gRGR7n5wLtP8aQtyRl euus+xkYzCX1sgcUKJMCUfNWhoD+TfGNaURTDRryRz476E+VtkA7ucwmu6yyM7gUHg4Z 9ynEKnE5yGJC+IoB16+VNFXI93QQM+SgyL6lMh0eqoRJlqvDegBQC34Es5KsJ6Niulg/ GClg== 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=Mfq4kjW901ggWIzO/i5J0fItYSMhv8zkYGGftq2+ieSzWEN4O5nkkk37zkqCz+99DR 5gLc1jnHQ8KzFKFzh7p0lI4MLHt+DFAKjmEzcyxAtk4iebAZGiOOtDmVTfADhkqMPNdj cvfZ6OLljKF5Dm8bvWRWp0ne73NsLMl1BT/1YglZfQbLH3ZrSs3ljW2vvY0k+1031wFh wCZiLA/1Zb8LowWHOx2gauoI1lwc8jDzOlFcVkQ9ltTdJObbp/p1T+MwcO2TE/b/l5uZ QMYHFaAeKyJx86g7SXcL42nHd3xKitd8uEYTIfomIGJGJhFOMfJAyByRWFnO/9e+oNd/ 4PmA== X-Forwarded-Encrypted: i=1; AJvYcCVMEVjW0wU16QmMp7JSTgiPKx/q7uJBPSbwa5RjLuhE0NaQ3jnCfi2rkpVSlSiU36Z/GRnCY33vcjRBBGLlHPDLU9gcTvjje6L+mNxE5w== X-Gm-Message-State: AOJu0YwUUAkdX7Mjve/ClkBtDY1D5XRV8pK5LnpCI7pt8R+qBYU+znrD clPEZUpvG/JR7qqL+Lb7N6nxPgqw6p4v1HF7RlfEZmPQqqwujZwlxVTSFghRZSkWCzH4G5W3YZ9 Fpg== 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> 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_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 , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_144621_269460_F9CA3F2E X-CRM114-Status: GOOD ( 13.19 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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/M [...] Content analysis details: (-7.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1049 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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/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