From patchwork Mon Jan 30 18:35:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13121664 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 E7E27C636D3 for ; Mon, 30 Jan 2023 18:36:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236974AbjA3SgI (ORCPT ); Mon, 30 Jan 2023 13:36:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237895AbjA3SgI (ORCPT ); Mon, 30 Jan 2023 13:36:08 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0CE26AD; Mon, 30 Jan 2023 10:35:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1675103755; bh=AYGBgN50Jr1DUDnzCE+Pzynb8j9uxfAHOfkP82pWKaU=; h=From:To:Cc:Subject:Date:From; b=NgUHyCRBAip4aOgELlG0MTM/tlyiZ0/5JnsMFENUMRIaoj7CahT30UZ4Fne4We8lK iFcxEqINtnPr9hTS3Q7Ctu3WOTEdYwhyULhXSEKoiXjZ2kXrZf5AhHa+E5NEqJzrX7 X1ogrYuSABJt/4dPrtleVeNSuWQ5ZPkR2bQXnk8JHjmkUB4NXTiCSIR6fs+le0Hkl1 XgqWCwi+uWMLjx3BehePK63VNjwgXqFDywMK1bWHxeCiIhwqumXuXH3jv9ndpFwE70 mC4fnML9NV+ydck5aVL3LqXK1MV9g9OjwMGyCppV4OHHVDszwDtzIVqRwCtMrTRU9c 9RD27jZG1QrPQ== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4P5H1k6F44zhmX; Mon, 30 Jan 2023 13:35:54 -0500 (EST) From: Mathieu Desnoyers To: Alexei Starovoitov Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Shuah Khan , bpf@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, Ingo Molnar , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , stable@vger.kernel.org Subject: [PATCH bpf-next 1/2] selftests: bpf: Fix incorrect kernel headers search path Date: Mon, 30 Jan 2023 13:35:48 -0500 Message-Id: <20230130183549.85471-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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 Acked-by: Shuah Khan Cc: Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Cc: Mykola Lysenko Cc: [5.18+] --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index c22c43bbee19..6998c816afef 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -327,7 +327,7 @@ endif CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) BPF_CFLAGS = -g -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \ -I$(INCLUDE_DIR) -I$(CURDIR) -I$(APIDIR) \ - -I$(abspath $(OUTPUT)/../usr/include) + $(KHDR_INCLUDES) CLANG_CFLAGS = $(CLANG_SYS_INCLUDES) \ -Wno-compare-distinct-pointer-types From patchwork Mon Jan 30 18:35:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13121665 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 88CE8C636D7 for ; Mon, 30 Jan 2023 18:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238083AbjA3SgJ (ORCPT ); Mon, 30 Jan 2023 13:36:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238010AbjA3SgI (ORCPT ); Mon, 30 Jan 2023 13:36:08 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A60A34C33; Mon, 30 Jan 2023 10:35:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1675103755; bh=MvodwzQDiD9u4tU1mzZzSTt7WoVE7au7QH14YGe8X4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2eDQDq1Br5CuoXxwGvcKHghIEOZa5ltoXKyrlJYa+ijydZX0c3MdwiMxAAuRau3A 0Ehm/wz8wFuiLL4EjcbgMT1P9Dp0IS3tLnnJjv8Thrm2LObJ6c4PoVOZ3PK4UVD06d wvjV3lhfsQoE945Rvi06IkBM3kVpdyDIJ9natyRFLj9YxONZJl/zJ2iUfkoPm9PcXQ QBbvzhbJyullgCGI7PrDLifV+XjvV3pQzJiVIbry4dShhTSwMzJMv505Q/CikIyodd 46kJWz3qHi+fr/bt8ZvrS/2XwU3Tk+TkRzANBYy0zGLnn8w7uaCugmGwL+5qWVLOgT bra/PP4VDYkLg== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4P5H1l264mzhmY; Mon, 30 Jan 2023 13:35:55 -0500 (EST) From: Mathieu Desnoyers To: Alexei Starovoitov Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Shuah Khan , bpf@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, Ingo Molnar , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko Subject: [PATCH bpf-next 2/2] selftests: bpf docs: Use installed kernel headers search path Date: Mon, 30 Jan 2023 13:35:49 -0500 Message-Id: <20230130183549.85471-2-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230130183549.85471-1-mathieu.desnoyers@efficios.com> References: <20230130183549.85471-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan Cc: Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Cc: Mykola Lysenko --- tools/testing/selftests/bpf/Makefile.docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile.docs b/tools/testing/selftests/bpf/Makefile.docs index eb6a4fea8c79..0a538d873def 100644 --- a/tools/testing/selftests/bpf/Makefile.docs +++ b/tools/testing/selftests/bpf/Makefile.docs @@ -44,7 +44,7 @@ RST2MAN_DEP := $(shell command -v rst2man 2>/dev/null) # $1 - target for scripts/bpf_doc.py # $2 - man page section to generate the troff file define DOCS_RULES = -$(OUTPUT)bpf-$1.rst: ../../../../include/uapi/linux/bpf.h +$(OUTPUT)bpf-$1.rst: $(KHDR_INCLUDES)/linux/bpf.h $$(QUIET_GEN)../../../../scripts/bpf_doc.py $1 \ --filename $$< > $$@