Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E04AC38142 for ; Fri, 27 Jan 2023 13:59:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234579AbjA0N7G (ORCPT ); Fri, 27 Jan 2023 08:59:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233715AbjA0N6L (ORCPT ); Fri, 27 Jan 2023 08:58:11 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A3622012; Fri, 27 Jan 2023 05:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1674827884; bh=cTnlMtt/TSsCRchCKp67NRzjFc2OauBkH++SjQF+yLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hZDmL7dy7O2Ch69odJb+uxDN1ztpocAPZgbInxLegCpGkBT2uIve++5ALcSwFTrt6 H6VC1ypiyuQcIoiJCMtTBjzjLDU3MkYjKtmE44KbilAT2V0+KGaeGfVJ5h2XWAj0SO VNAxmOekgJ6exPS50DZMkInYwLF9ueZg4n4klwuHOEJI/5zu8trLaLIbYpkSmho7ll fOAK4W8jDIyBdrBZcSzVc/yGGZjvQx+l03PY3IAtWd6kOVeSvxxDAMOf/WMGBjIlua rO/atyofT5xpL0b02JWBfoeAMhhoJmo4f7tI9eedYMbz7ORHsfTRDxUG5gUyq60+dk fkoavG7xVcpig== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4P3K0X5QMGzhxV; Fri, 27 Jan 2023 08:58:04 -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 17/34] selftests: net: Fix incorrect kernel headers search path Date: Fri, 27 Jan 2023 08:57:38 -0500 Message-Id: <20230127135755.79929-18-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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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+] --- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/bpf/Makefile | 2 +- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/openvswitch/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 3007e98a6d64..bab1222c7d50 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -2,7 +2,7 @@ # Makefile for net selftests CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES) +CFLAGS += $(KHDR_INCLUDES) TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh \ rtnetlink.sh xfrm_policy.sh test_blackhole_dev.sh diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile index 4abaf16d2077..207b6b958f66 100644 --- a/tools/testing/selftests/net/bpf/Makefile +++ b/tools/testing/selftests/net/bpf/Makefile @@ -7,7 +7,7 @@ BPFDIR := $(abspath ../../../lib/bpf) APIDIR := $(abspath ../../../include/uapi) CCINCLUDE += -I../../bpf -CCINCLUDE += -I../../../../../usr/include/ +CCINCLUDE += $(KHDR_INCLUDES) CCINCLUDE += -I$(SCRATCH_DIR)/include BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 43a723626126..06bba013bcef 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -2,7 +2,7 @@ top_srcdir = ../../../../.. -CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) +CFLAGS = -Wall -Wl,--no-as-needed -O2 -g $(KHDR_INCLUDES) TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh userspace_pm.sh diff --git a/tools/testing/selftests/net/openvswitch/Makefile b/tools/testing/selftests/net/openvswitch/Makefile index 2f1508abc826..41ddfa9fdd1d 100644 --- a/tools/testing/selftests/net/openvswitch/Makefile +++ b/tools/testing/selftests/net/openvswitch/Makefile @@ -2,7 +2,7 @@ top_srcdir = ../../../../.. -CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) +CFLAGS = -Wall -Wl,--no-as-needed -O2 -g $(KHDR_INCLUDES) TEST_PROGS := openvswitch.sh -- 2.25.1