From patchwork Fri Jan 27 13:57:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 49435 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp848902wrn; Fri, 27 Jan 2023 06:03:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXujBnyuqQZIdLLjxr8VatZ/5EGsPxhxnnECwoRtgYK4PrKzzTPG3KjmiqV7kJiq4XtjPwk8 X-Received: by 2002:a05:6402:4486:b0:48f:a9a2:29f4 with SMTP id er6-20020a056402448600b0048fa9a229f4mr44092424edb.1.1674828205672; Fri, 27 Jan 2023 06:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674828205; cv=none; d=google.com; s=arc-20160816; b=bwdblktMvtvveGcvm8m9ffFwm9H8XMk7vEOVrnl4qXR2DpvvGn5ZwAGozK+LRy84+f 4CCcpLdQXi9Ddm5Jr9Ip1s1/uNfRszynrHoHCbXcKK0jxh5mjBxlZUNaX1bW4xVvTx1e MyLeTxVyKT9L9jt1Xg+eNkP30ZTWKlFNNlctMdGXsov4gULW8qGaGEAEiWGe5gqye4rd oCnopHNtUkwOjyG7aKehdMPx8KC7yV6q7IOiCY2RiVC5YxIkE1EzwmiXBqtUpoIcrEw3 aOqVkej6/AlUjfJxwddT+f1DAGBDU7VKTDmJTt/lMR28SwOB1GJg8ce4IVt3d+zgW1aM Xg5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pjzis+pVGfgRsP7w+uR+vdTAH2pPpRA0KELTr7rPYKA=; b=YvqPE4ZV2nQIyYtYnliADh6PHn0jgiQDyHGxynQRpbEA1dZjwlN47g8r2vEvr3/Ocn YKd2kX5JAllO4iNfwEWHiJLTAUxytw18Se/cSO4v/KdNR6nbQh/VRJc9iGrFDWRHn652 FSMZmGL6WnM0wavANoGqgLUDb911CctP/AVyajxFiOvPzgf0GlpXfPMn0TGegtqR84mW ghV2Y5zo3HGmNYbObZjlhdiFmGA9kcjfBTtMpiTu51hX5Cdvkb8NGesjFu+/fCLIwxYi ug/+BVbcerHPME0XBg2mzFqHPUu9q9/kpGea/4ufoTb0tDNLyXU9LsraMFo5HsY4b8un u+PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=IkB8kiVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz16-20020a0564021d5000b00461acb2deebsi6760676edb.198.2023.01.27.06.02.47; Fri, 27 Jan 2023 06:03:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=IkB8kiVC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234759AbjA0N71 (ORCPT + 99 others); Fri, 27 Jan 2023 08:59:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233858AbjA0N61 (ORCPT ); Fri, 27 Jan 2023 08:58:27 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A5F1BE; Fri, 27 Jan 2023 05:58:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1674827885; bh=W1SNh9l0TTB1KBtqwgm3YAfF4yBh2kKc5Jd9s6u7Pq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IkB8kiVCqVI+YwWj5pZqoy1+Z4gzF1KJ2e2rHjwkerBQWcq5fEosi742/rGPUImHX 1dAuTpad1nej1fnX5w5HCinO3PO4hAYR0VGbUBwKHDEK6fIc/UBUvhk8VsV6qRsebi bHETpeJcM5kAYj7vSimd75R7p/b1cG2FHPwBfIaRFkmrzStZ05cUHhGSBvE1ygDCvX DQlDt4T/NrVIvupKeDHIzXH+jZ5vrflGHxJMXC6a8qCQ9adK9fj4wlJGprJKD+Plop /TRahV4z8roHAZZD1n4pzREhg3mnU5l82sfh9/4jf8Xok6hSaMWGI2I/7TC8BIsz7r RwU8Q+y2puuNQ== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4P3K0Y4Jt3zhWf; Fri, 27 Jan 2023 08:58:05 -0500 (EST) From: Mathieu Desnoyers To: Shuah Khan , linux-kselftest@vger.kernel.org, Ingo Molnar Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , stable@vger.kernel.org Subject: [PATCH 21/34] selftests: powerpc: Fix incorrect kernel headers search path Date: Fri, 27 Jan 2023 08:57:42 -0500 Message-Id: <20230127135755.79929-22-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230127135755.79929-1-mathieu.desnoyers@efficios.com> References: <20230127135755.79929-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756184660886853665?= X-GMAIL-MSGID: =?utf-8?q?1756184660886853665?= Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: [5.18+] Acked-by: Shuah Khan --- tools/testing/selftests/powerpc/ptrace/Makefile | 2 +- tools/testing/selftests/powerpc/security/Makefile | 2 +- tools/testing/selftests/powerpc/syscalls/Makefile | 2 +- tools/testing/selftests/powerpc/tm/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile index 2f02cb54224d..cbeeaeae8837 100644 --- a/tools/testing/selftests/powerpc/ptrace/Makefile +++ b/tools/testing/selftests/powerpc/ptrace/Makefile @@ -33,7 +33,7 @@ TESTS_64 := $(patsubst %,$(OUTPUT)/%,$(TESTS_64)) $(TESTS_64): CFLAGS += -m64 $(TM_TESTS): CFLAGS += -I../tm -mhtm -CFLAGS += -I../../../../../usr/include -fno-pie +CFLAGS += $(KHDR_INCLUDES) -fno-pie $(OUTPUT)/ptrace-gpr: ptrace-gpr.S $(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread diff --git a/tools/testing/selftests/powerpc/security/Makefile b/tools/testing/selftests/powerpc/security/Makefile index 7488315fd847..e0d979ab0204 100644 --- a/tools/testing/selftests/powerpc/security/Makefile +++ b/tools/testing/selftests/powerpc/security/Makefile @@ -5,7 +5,7 @@ TEST_PROGS := mitigation-patching.sh top_srcdir = ../../../../.. -CFLAGS += -I../../../../../usr/include +CFLAGS += $(KHDR_INCLUDES) include ../../lib.mk diff --git a/tools/testing/selftests/powerpc/syscalls/Makefile b/tools/testing/selftests/powerpc/syscalls/Makefile index b63f8459c704..d1f2648b112b 100644 --- a/tools/testing/selftests/powerpc/syscalls/Makefile +++ b/tools/testing/selftests/powerpc/syscalls/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only TEST_GEN_PROGS := ipc_unmuxed rtas_filter -CFLAGS += -I../../../../../usr/include +CFLAGS += $(KHDR_INCLUDES) top_srcdir = ../../../../.. include ../../lib.mk diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile index 5881e97c73c1..3876805c2f31 100644 --- a/tools/testing/selftests/powerpc/tm/Makefile +++ b/tools/testing/selftests/powerpc/tm/Makefile @@ -17,7 +17,7 @@ $(TEST_GEN_PROGS): ../harness.c ../utils.c CFLAGS += -mhtm $(OUTPUT)/tm-syscall: tm-syscall-asm.S -$(OUTPUT)/tm-syscall: CFLAGS += -I../../../../../usr/include +$(OUTPUT)/tm-syscall: CFLAGS += $(KHDR_INCLUDES) $(OUTPUT)/tm-tmspr: CFLAGS += -pthread $(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64 $(OUTPUT)/tm-resched-dscr: ../pmu/lib.c