* [PATCH 00/34] selftests: Fix incorrect kernel headers search path
@ 2023-01-27 13:57 Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
` (35 more replies)
0 siblings, 36 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
Hi,
This series fixes incorrect kernel header search path in kernel
selftests.
Near the end of the series, a few changes are not tagged as "Fixes"
because the current behavior is to rely on the kernel sources uapi files
rather than on the installed kernel header files. Nevertheless, those
are updated for consistency.
There are situations where "../../../../include/" was added to -I search
path, which is bogus for userspace tests and caused issues with types.h.
Those are removed.
Thanks,
Mathieu
Mathieu Desnoyers (34):
selftests: arm64: Fix incorrect kernel headers search path
selftests: bpf: Fix incorrect kernel headers search path
selftests: clone3: Fix incorrect kernel headers search path
selftests: core: Fix incorrect kernel headers search path
selftests: dma: Fix incorrect kernel headers search path
selftests: dmabuf-heaps: Fix incorrect kernel headers search path
selftests: drivers: Fix incorrect kernel headers search path
selftests: filesystems: Fix incorrect kernel headers search path
selftests: futex: Fix incorrect kernel headers search path
selftests: gpio: Fix incorrect kernel headers search path
selftests: ipc: Fix incorrect kernel headers search path
selftests: kcmp: Fix incorrect kernel headers search path
selftests: media_tests: Fix incorrect kernel headers search path
selftests: membarrier: Fix incorrect kernel headers search path
selftests: mount_setattr: Fix incorrect kernel headers search path
selftests: move_mount_set_group: Fix incorrect kernel headers search
path
selftests: net: Fix incorrect kernel headers search path
selftests: perf_events: Fix incorrect kernel headers search path
selftests: pid_namespace: Fix incorrect kernel headers search path
selftests: pidfd: Fix incorrect kernel headers search path
selftests: powerpc: Fix incorrect kernel headers search path
selftests: ptp: Fix incorrect kernel headers search path
selftests: rseq: Fix incorrect kernel headers search path
selftests: sched: Fix incorrect kernel headers search path
selftests: seccomp: Fix incorrect kernel headers search path
selftests: sync: Fix incorrect kernel headers search path
selftests: user_events: Fix incorrect kernel headers search path
selftests: vm: Fix incorrect kernel headers search path
selftests: x86: Fix incorrect kernel headers search path
selftests: bpf docs: Use installed kernel headers search path
selftests: iommu: Use installed kernel headers search path
selftests: memfd: Use installed kernel headers search path
selftests: ptrace: Use installed kernel headers search path
selftests: tdx: Use installed kernel headers search path
tools/testing/selftests/arm64/fp/Makefile | 2 +-
tools/testing/selftests/arm64/tags/Makefile | 2 +-
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing/selftests/bpf/Makefile.docs | 2 +-
tools/testing/selftests/clone3/Makefile | 2 +-
tools/testing/selftests/core/Makefile | 2 +-
tools/testing/selftests/dma/Makefile | 2 +-
tools/testing/selftests/dmabuf-heaps/Makefile | 2 +-
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 3 +--
tools/testing/selftests/drivers/dma-buf/Makefile | 2 +-
tools/testing/selftests/drivers/s390x/uvdevice/Makefile | 3 +--
tools/testing/selftests/filesystems/Makefile | 2 +-
tools/testing/selftests/filesystems/binderfs/Makefile | 2 +-
tools/testing/selftests/filesystems/epoll/Makefile | 2 +-
tools/testing/selftests/futex/functional/Makefile | 2 +-
tools/testing/selftests/gpio/Makefile | 2 +-
tools/testing/selftests/iommu/Makefile | 3 +--
tools/testing/selftests/ipc/Makefile | 2 +-
tools/testing/selftests/kcmp/Makefile | 2 +-
tools/testing/selftests/media_tests/Makefile | 2 +-
tools/testing/selftests/membarrier/Makefile | 2 +-
tools/testing/selftests/memfd/Makefile | 4 +---
tools/testing/selftests/mount_setattr/Makefile | 2 +-
tools/testing/selftests/move_mount_set_group/Makefile | 2 +-
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 +-
tools/testing/selftests/perf_events/Makefile | 2 +-
tools/testing/selftests/pid_namespace/Makefile | 2 +-
tools/testing/selftests/pidfd/Makefile | 2 +-
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 +-
tools/testing/selftests/ptp/Makefile | 2 +-
tools/testing/selftests/ptrace/Makefile | 2 +-
tools/testing/selftests/rseq/Makefile | 2 +-
tools/testing/selftests/sched/Makefile | 2 +-
tools/testing/selftests/seccomp/Makefile | 2 +-
tools/testing/selftests/sync/Makefile | 2 +-
tools/testing/selftests/tdx/Makefile | 2 +-
tools/testing/selftests/tdx/tdx_guest_test.c | 2 +-
tools/testing/selftests/user_events/Makefile | 2 +-
tools/testing/selftests/vm/Makefile | 2 +-
tools/testing/selftests/x86/Makefile | 2 +-
46 files changed, 46 insertions(+), 51 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 01/34] selftests: arm64: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:09 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 02/34] selftests: bpf: " Mathieu Desnoyers
` (34 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/arm64/fp/Makefile | 2 +-
tools/testing/selftests/arm64/tags/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/fp/Makefile b/tools/testing/selftests/arm64/fp/Makefile
index 36db61358ed5..932ec8792316 100644
--- a/tools/testing/selftests/arm64/fp/Makefile
+++ b/tools/testing/selftests/arm64/fp/Makefile
@@ -3,7 +3,7 @@
# A proper top_srcdir is needed by KSFT(lib.mk)
top_srcdir = $(realpath ../../../../../)
-CFLAGS += -I$(top_srcdir)/usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := fp-stress \
sve-ptrace sve-probe-vls \
diff --git a/tools/testing/selftests/arm64/tags/Makefile b/tools/testing/selftests/arm64/tags/Makefile
index 41cb75070511..6d29cfde43a2 100644
--- a/tools/testing/selftests/arm64/tags/Makefile
+++ b/tools/testing/selftests/arm64/tags/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := tags_test
TEST_PROGS := run_tags_test.sh
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:12 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 03/34] selftests: clone3: " Mathieu Desnoyers
` (33 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [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
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 03/34] selftests: clone3: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 02/34] selftests: bpf: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:15 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 04/34] selftests: core: " Mathieu Desnoyers
` (32 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/clone3/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile
index 79b19a2863a0..84832c369a2e 100644
--- a/tools/testing/selftests/clone3/Makefile
+++ b/tools/testing/selftests/clone3/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -g -std=gnu99 -I../../../../usr/include/
+CFLAGS += -g -std=gnu99 $(KHDR_INCLUDES)
LDLIBS += -lcap
TEST_GEN_PROGS := clone3 clone3_clear_sighand clone3_set_tid \
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 04/34] selftests: core: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (2 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 03/34] selftests: clone3: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 05/34] selftests: dma: " Mathieu Desnoyers
` (31 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/core/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/core/Makefile b/tools/testing/selftests/core/Makefile
index f6f2d6f473c6..ce262d097269 100644
--- a/tools/testing/selftests/core/Makefile
+++ b/tools/testing/selftests/core/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -g -I../../../../usr/include/
+CFLAGS += -g $(KHDR_INCLUDES)
TEST_GEN_PROGS := close_range_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 05/34] selftests: dma: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (3 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 04/34] selftests: core: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 06/34] selftests: dmabuf-heaps: " Mathieu Desnoyers
` (30 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/dma/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/dma/Makefile b/tools/testing/selftests/dma/Makefile
index cd8c5ece1cba..dd7f746f3e84 100644
--- a/tools/testing/selftests/dma/Makefile
+++ b/tools/testing/selftests/dma/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
CFLAGS += -I../../../../include/
TEST_GEN_PROGS := dma_map_benchmark
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 06/34] selftests: dmabuf-heaps: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (4 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 05/34] selftests: dma: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 07/34] selftests: drivers: " Mathieu Desnoyers
` (29 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/dmabuf-heaps/Makefile | 2 +-
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/dmabuf-heaps/Makefile b/tools/testing/selftests/dmabuf-heaps/Makefile
index 604b43ece15f..9e7e158d5fa3 100644
--- a/tools/testing/selftests/dmabuf-heaps/Makefile
+++ b/tools/testing/selftests/dmabuf-heaps/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -static -O3 -Wl,-no-as-needed -Wall
+CFLAGS += -static -O3 -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
TEST_GEN_PROGS = dmabuf-heap
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index 29af27acd40e..890a8236a8ba 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -13,10 +13,9 @@
#include <sys/types.h>
#include <linux/dma-buf.h>
+#include <linux/dma-heap.h>
#include <drm/drm.h>
-#include "../../../../include/uapi/linux/dma-heap.h"
-
#define DEVPATH "/dev/dma_heap"
static int check_vgem(int fd)
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 07/34] selftests: drivers: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (5 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 06/34] selftests: dmabuf-heaps: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 08/34] selftests: filesystems: " Mathieu Desnoyers
` (28 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/drivers/dma-buf/Makefile | 2 +-
tools/testing/selftests/drivers/s390x/uvdevice/Makefile | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/drivers/dma-buf/Makefile b/tools/testing/selftests/drivers/dma-buf/Makefile
index 79cb16b4e01a..441407bb0e80 100644
--- a/tools/testing/selftests/drivers/dma-buf/Makefile
+++ b/tools/testing/selftests/drivers/dma-buf/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -I../../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := udmabuf
diff --git a/tools/testing/selftests/drivers/s390x/uvdevice/Makefile b/tools/testing/selftests/drivers/s390x/uvdevice/Makefile
index 891215a7dc8a..755d164384c4 100644
--- a/tools/testing/selftests/drivers/s390x/uvdevice/Makefile
+++ b/tools/testing/selftests/drivers/s390x/uvdevice/Makefile
@@ -11,10 +11,9 @@ else
TEST_GEN_PROGS := test_uvdevice
top_srcdir ?= ../../../../../..
-khdr_dir = $(top_srcdir)/usr/include
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
-CFLAGS += -Wall -Werror -static -I$(khdr_dir) -I$(LINUX_TOOL_ARCH_INCLUDE)
+CFLAGS += -Wall -Werror -static $(KHDR_INCLUDES) -I$(LINUX_TOOL_ARCH_INCLUDE)
include ../../../lib.mk
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 08/34] selftests: filesystems: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (6 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 07/34] selftests: drivers: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 09/34] selftests: futex: " Mathieu Desnoyers
` (27 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/filesystems/Makefile | 2 +-
tools/testing/selftests/filesystems/binderfs/Makefile | 2 +-
tools/testing/selftests/filesystems/epoll/Makefile | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/filesystems/Makefile b/tools/testing/selftests/filesystems/Makefile
index 129880fb42d3..c647fd6a0446 100644
--- a/tools/testing/selftests/filesystems/Makefile
+++ b/tools/testing/selftests/filesystems/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := devpts_pts
TEST_GEN_PROGS_EXTENDED := dnotify_test
diff --git a/tools/testing/selftests/filesystems/binderfs/Makefile b/tools/testing/selftests/filesystems/binderfs/Makefile
index 8af25ae96049..c2f7cef919c0 100644
--- a/tools/testing/selftests/filesystems/binderfs/Makefile
+++ b/tools/testing/selftests/filesystems/binderfs/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../../usr/include/ -pthread
+CFLAGS += $(KHDR_INCLUDES) -pthread
TEST_GEN_PROGS := binderfs_test
binderfs_test: binderfs_test.c ../../kselftest.h ../../kselftest_harness.h
diff --git a/tools/testing/selftests/filesystems/epoll/Makefile b/tools/testing/selftests/filesystems/epoll/Makefile
index 78ae4aaf7141..0788a7dc8004 100644
--- a/tools/testing/selftests/filesystems/epoll/Makefile
+++ b/tools/testing/selftests/filesystems/epoll/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
LDLIBS += -lpthread
TEST_GEN_PROGS := epoll_wakeup_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 09/34] selftests: futex: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (7 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 08/34] selftests: filesystems: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 10/34] selftests: gpio: " Mathieu Desnoyers
` (26 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/futex/functional/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 5a0e0df8de9b..a392d0917b4e 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-INCLUDES := -I../include -I../../ -I../../../../../usr/include/
+INCLUDES := -I../include -I../../ $(KHDR_INCLUDES)
CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES)
LDLIBS := -lpthread -lrt
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 10/34] selftests: gpio: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (8 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 09/34] selftests: futex: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 11/34] selftests: ipc: " Mathieu Desnoyers
` (25 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/gpio/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 616ed4019655..e0884390447d 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -3,6 +3,6 @@
TEST_PROGS := gpio-mockup.sh gpio-sim.sh
TEST_FILES := gpio-mockup-sysfs.sh
TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name
-CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES)
+CFLAGS += -O2 -g -Wall $(KHDR_INCLUDES)
include ../lib.mk
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 11/34] selftests: ipc: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (9 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 10/34] selftests: gpio: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 12/34] selftests: kcmp: " Mathieu Desnoyers
` (24 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/ipc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile
index 1c4448a843a4..50e9c299fc4a 100644
--- a/tools/testing/selftests/ipc/Makefile
+++ b/tools/testing/selftests/ipc/Makefile
@@ -10,7 +10,7 @@ ifeq ($(ARCH),x86_64)
CFLAGS := -DCONFIG_X86_64 -D__x86_64__
endif
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := msgque
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 12/34] selftests: kcmp: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (10 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 11/34] selftests: ipc: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 13/34] selftests: media_tests: " Mathieu Desnoyers
` (23 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/kcmp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index b4d39f6b5124..59a1e5379018 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := kcmp_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 13/34] selftests: media_tests: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (11 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 12/34] selftests: kcmp: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 14/34] selftests: membarrier: " Mathieu Desnoyers
` (22 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/media_tests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/media_tests/Makefile b/tools/testing/selftests/media_tests/Makefile
index 60826d7d37d4..471d83e61d95 100644
--- a/tools/testing/selftests/media_tests/Makefile
+++ b/tools/testing/selftests/media_tests/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
#
-CFLAGS += -I../ -I../../../../usr/include/
+CFLAGS += -I../ $(KHDR_INCLUDES)
TEST_GEN_PROGS := media_device_test media_device_open video_device_test
include ../lib.mk
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 14/34] selftests: membarrier: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (12 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 13/34] selftests: media_tests: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 15/34] selftests: mount_setattr: " Mathieu Desnoyers
` (21 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/membarrier/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/membarrier/Makefile b/tools/testing/selftests/membarrier/Makefile
index 34d1c81a2324..fc840e06ff56 100644
--- a/tools/testing/selftests/membarrier/Makefile
+++ b/tools/testing/selftests/membarrier/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -g -I../../../../usr/include/
+CFLAGS += -g $(KHDR_INCLUDES)
LDLIBS += -lpthread
TEST_GEN_PROGS := membarrier_test_single_thread \
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 15/34] selftests: mount_setattr: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (13 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 14/34] selftests: membarrier: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 16/34] selftests: move_mount_set_group: " Mathieu Desnoyers
` (20 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/mount_setattr/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mount_setattr/Makefile b/tools/testing/selftests/mount_setattr/Makefile
index 2250f7dcb81e..fde72df01b11 100644
--- a/tools/testing/selftests/mount_setattr/Makefile
+++ b/tools/testing/selftests/mount_setattr/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for mount selftests.
-CFLAGS = -g -I../../../../usr/include/ -Wall -O2 -pthread
+CFLAGS = -g $(KHDR_INCLUDES) -Wall -O2 -pthread
TEST_GEN_FILES += mount_setattr_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 16/34] selftests: move_mount_set_group: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (14 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 15/34] selftests: mount_setattr: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
` (19 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/move_mount_set_group/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/move_mount_set_group/Makefile b/tools/testing/selftests/move_mount_set_group/Makefile
index 80c2d86812b0..94235846b6f9 100644
--- a/tools/testing/selftests/move_mount_set_group/Makefile
+++ b/tools/testing/selftests/move_mount_set_group/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for mount selftests.
-CFLAGS = -g -I../../../../usr/include/ -Wall -O2
+CFLAGS = -g $(KHDR_INCLUDES) -Wall -O2
TEST_GEN_FILES += move_mount_set_group_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 17/34] selftests: net: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (15 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 16/34] selftests: move_mount_set_group: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 16:21 ` Matthieu Baerts
2023-01-30 16:24 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 18/34] selftests: perf_events: " Mathieu Desnoyers
` (18 subsequent siblings)
35 siblings, 2 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [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
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 18/34] selftests: perf_events: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (16 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 19/34] selftests: pid_namespace: " Mathieu Desnoyers
` (17 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/perf_events/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/perf_events/Makefile b/tools/testing/selftests/perf_events/Makefile
index fcafa5f0d34c..db93c4ff081a 100644
--- a/tools/testing/selftests/perf_events/Makefile
+++ b/tools/testing/selftests/perf_events/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -Wl,-no-as-needed -Wall -I../../../../usr/include
+CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
LDFLAGS += -lpthread
TEST_GEN_PROGS := sigtrap_threads remove_on_exec
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 19/34] selftests: pid_namespace: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (17 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 18/34] selftests: perf_events: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 20/34] selftests: pidfd: " Mathieu Desnoyers
` (16 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/pid_namespace/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/pid_namespace/Makefile b/tools/testing/selftests/pid_namespace/Makefile
index edafaca1aeb3..9286a1d22cd3 100644
--- a/tools/testing/selftests/pid_namespace/Makefile
+++ b/tools/testing/selftests/pid_namespace/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -g -I../../../../usr/include/
+CFLAGS += -g $(KHDR_INCLUDES)
TEST_GEN_PROGS = regression_enomem
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 20/34] selftests: pidfd: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (18 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 19/34] selftests: pid_namespace: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 21/34] selftests: powerpc: " Mathieu Desnoyers
` (15 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/pidfd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/pidfd/Makefile b/tools/testing/selftests/pidfd/Makefile
index 778b6cdc8aed..d731e3e76d5b 100644
--- a/tools/testing/selftests/pidfd/Makefile
+++ b/tools/testing/selftests/pidfd/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -g -I../../../../usr/include/ -pthread -Wall
+CFLAGS += -g $(KHDR_INCLUDES) -pthread -Wall
TEST_GEN_PROGS := pidfd_test pidfd_fdinfo_test pidfd_open_test \
pidfd_poll_test pidfd_wait pidfd_getfd_test pidfd_setns_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 21/34] selftests: powerpc: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (19 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 20/34] selftests: pidfd: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:32 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 22/34] selftests: ptp: " Mathieu Desnoyers
` (14 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
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
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 22/34] selftests: ptp: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (20 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 21/34] selftests: powerpc: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 23/34] selftests: rseq: " Mathieu Desnoyers
` (13 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/ptp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ptp/Makefile b/tools/testing/selftests/ptp/Makefile
index ef06de0898b7..eeab44cc6863 100644
--- a/tools/testing/selftests/ptp/Makefile
+++ b/tools/testing/selftests/ptp/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_PROGS := testptp
LDLIBS += -lrt
all: $(TEST_PROGS)
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 23/34] selftests: rseq: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (21 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 22/34] selftests: ptp: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 24/34] selftests: sched: " Mathieu Desnoyers
` (12 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/rseq/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile
index 215e1067f037..3a173e184566 100644
--- a/tools/testing/selftests/rseq/Makefile
+++ b/tools/testing/selftests/rseq/Makefile
@@ -4,7 +4,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
CLANG_FLAGS += -no-integrated-as
endif
-CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -L$(OUTPUT) -Wl,-rpath=./ \
+CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=./ \
$(CLANG_FLAGS)
LDLIBS += -lpthread -ldl
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 24/34] selftests: sched: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (22 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 23/34] selftests: rseq: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 25/34] selftests: seccomp: " Mathieu Desnoyers
` (11 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/sched/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sched/Makefile b/tools/testing/selftests/sched/Makefile
index 10c72f14fea9..099ee9213557 100644
--- a/tools/testing/selftests/sched/Makefile
+++ b/tools/testing/selftests/sched/Makefile
@@ -4,7 +4,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
CLANG_FLAGS += -no-integrated-as
endif
-CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -Wl,-rpath=./ \
+CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -Wl,-rpath=./ \
$(CLANG_FLAGS)
LDLIBS += -lpthread
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 25/34] selftests: seccomp: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (23 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 24/34] selftests: sched: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:52 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 26/34] selftests: sync: " Mathieu Desnoyers
` (10 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/seccomp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
index f017c382c036..584fba487037 100644
--- a/tools/testing/selftests/seccomp/Makefile
+++ b/tools/testing/selftests/seccomp/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/
+CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
LDFLAGS += -lpthread
LDLIBS += -lcap
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 26/34] selftests: sync: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (24 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 25/34] selftests: seccomp: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:44 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 27/34] selftests: user_events: " Mathieu Desnoyers
` (9 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/sync/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
index d0121a8a3523..df0f91bf6890 100644
--- a/tools/testing/selftests/sync/Makefile
+++ b/tools/testing/selftests/sync/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
LDFLAGS += -pthread
.PHONY: all clean
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 27/34] selftests: user_events: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (25 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 26/34] selftests: sync: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 28/34] selftests: vm: " Mathieu Desnoyers
` (8 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/user_events/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/user_events/Makefile b/tools/testing/selftests/user_events/Makefile
index c765d8635d9a..87d54c640068 100644
--- a/tools/testing/selftests/user_events/Makefile
+++ b/tools/testing/selftests/user_events/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -Wl,-no-as-needed -Wall -I../../../../usr/include
+CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
LDLIBS += -lrt -lpthread -lm
TEST_GEN_PROGS = ftrace_test dyn_test perf_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 28/34] selftests: vm: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (26 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 27/34] selftests: user_events: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:55 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 29/34] selftests: x86: " Mathieu Desnoyers
` (7 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/vm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 89c14e41bd43..ac9366065fd2 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -25,7 +25,7 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/p
# LDLIBS.
MAKEFLAGS += --no-builtin-rules
-CFLAGS = -Wall -I $(top_srcdir) -I $(top_srcdir)/usr/include $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
+CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
LDLIBS = -lrt -lpthread
TEST_GEN_FILES = cow
TEST_GEN_FILES += compaction_test
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 29/34] selftests: x86: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (27 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 28/34] selftests: vm: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 30/34] selftests: bpf docs: Use installed " Mathieu Desnoyers
` (6 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, Mathieu Desnoyers, stable
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> [5.18+]
---
tools/testing/selftests/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 0388c4d60af0..ca9374b56ead 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -34,7 +34,7 @@ BINARIES_64 := $(TARGETS_C_64BIT_ALL:%=%_64)
BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
-CFLAGS := -O2 -g -std=gnu99 -pthread -Wall
+CFLAGS := -O2 -g -std=gnu99 -pthread -Wall $(KHDR_INCLUDES)
# call32_from_64 in thunks.S uses absolute addresses.
ifeq ($(CAN_BUILD_WITH_NOPIE),1)
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 30/34] selftests: bpf docs: Use installed kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (28 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 29/34] selftests: x86: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 16:57 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 31/34] selftests: iommu: " Mathieu Desnoyers
` (5 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
---
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 $$< > $$@
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 31/34] selftests: iommu: Use installed kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (29 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 30/34] selftests: bpf docs: Use installed " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 17:01 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 32/34] selftests: memfd: " Mathieu Desnoyers
` (4 subsequent siblings)
35 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
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.
Remove bogus ../../../../include/ from the search path, because
kernel source headers are not needed by those user-space selftests, and
it causes issues because -I paths are searched before -isystem paths,
and conflicts for files appearing both in kernel sources and in uapi
headers with incompatible semantics (e.g. types.h).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
---
tools/testing/selftests/iommu/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/iommu/Makefile b/tools/testing/selftests/iommu/Makefile
index 7cb74d26f141..32c5fdfd0eef 100644
--- a/tools/testing/selftests/iommu/Makefile
+++ b/tools/testing/selftests/iommu/Makefile
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
CFLAGS += -Wall -O2 -Wno-unused-function
-CFLAGS += -I../../../../include/uapi/
-CFLAGS += -I../../../../include/
+CFLAGS += $(KHDR_INCLUDES)
CFLAGS += -D_GNU_SOURCE
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 32/34] selftests: memfd: Use installed kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (30 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 31/34] selftests: iommu: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 33/34] selftests: ptrace: " Mathieu Desnoyers
` (3 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
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.
Remove bogus ../../../../include/ from the search path, because
kernel source headers are not needed by those user-space selftests, and
it causes issues because -I paths are searched before -isystem paths,
and conflicts for files appearing both in kernel sources and in uapi
headers with incompatible semantics (e.g. types.h).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
---
tools/testing/selftests/memfd/Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index 4da8b565fa32..163b6f68631c 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -D_FILE_OFFSET_BITS=64
-CFLAGS += -I../../../../include/uapi/
-CFLAGS += -I../../../../include/
-CFLAGS += -I../../../../usr/include/
+CFLAGS += $(KHDR_INCLUDES)
TEST_GEN_PROGS := memfd_test
TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 33/34] selftests: ptrace: Use installed kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (31 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 32/34] selftests: memfd: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 34/34] selftests: tdx: " Mathieu Desnoyers
` (2 subsequent siblings)
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
---
tools/testing/selftests/ptrace/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ptrace/Makefile b/tools/testing/selftests/ptrace/Makefile
index 2f1f532c39db..96ffa94afb91 100644
--- a/tools/testing/selftests/ptrace/Makefile
+++ b/tools/testing/selftests/ptrace/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-CFLAGS += -std=c99 -pthread -iquote../../../../include/uapi -Wall
+CFLAGS += -std=c99 -pthread -Wall $(KHDR_INCLUDES)
TEST_GEN_PROGS := get_syscall_info peeksiginfo vmaccess
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 34/34] selftests: tdx: Use installed kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (32 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 33/34] selftests: ptrace: " Mathieu Desnoyers
@ 2023-01-27 13:57 ` Mathieu Desnoyers
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
2023-02-20 3:49 ` (subset) " Michael Ellerman
35 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 13:57 UTC (permalink / raw)
To: Shuah Khan, linux-kselftest, Ingo Molnar; +Cc: linux-kernel, Mathieu Desnoyers
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 <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
---
tools/testing/selftests/tdx/Makefile | 2 +-
tools/testing/selftests/tdx/tdx_guest_test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/tdx/Makefile b/tools/testing/selftests/tdx/Makefile
index 8dd43517cd55..306e9c4d5ef7 100644
--- a/tools/testing/selftests/tdx/Makefile
+++ b/tools/testing/selftests/tdx/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -O3 -Wl,-no-as-needed -Wall -static
+CFLAGS += -O3 -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) -static
TEST_GEN_PROGS := tdx_guest_test
diff --git a/tools/testing/selftests/tdx/tdx_guest_test.c b/tools/testing/selftests/tdx/tdx_guest_test.c
index 2a2afd856798..81d8cb88ea1a 100644
--- a/tools/testing/selftests/tdx/tdx_guest_test.c
+++ b/tools/testing/selftests/tdx/tdx_guest_test.c
@@ -12,8 +12,8 @@
#include <errno.h>
#include <fcntl.h>
+#include <linux/tdx-guest.h>
#include "../kselftest_harness.h"
-#include "../../../../include/uapi/linux/tdx-guest.h"
#define TDX_GUEST_DEVNAME "/dev/tdx_guest"
#define HEX_DUMP_SIZE 8
--
2.25.1
^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH 17/34] selftests: net: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
@ 2023-01-27 16:21 ` Matthieu Baerts
2023-01-27 16:42 ` Mathieu Desnoyers
2023-01-30 16:24 ` Shuah Khan
1 sibling, 1 reply; 63+ messages in thread
From: Matthieu Baerts @ 2023-01-27 16:21 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, stable
Hi Mathieu,
On 27/01/2023 14:57, Mathieu Desnoyers wrote:
> 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=...).
Thank you for the patch!
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
(It might be useful to add a "Fixes" tag as well to clearly indicate the
dependence with a specific commit and better understand the fix.)
(and add all the individual maintainers of the files you modify -- feel
free to use 'b4' to help you for this task ;-) )
(...)
> 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)
I only looked at the modification here with MPTCP selftests and it looks
good to me. It makes sense because if KHDR_INCLUDES is not set, it will
be set later by lib.mk I suppose.
Just one small thing: I guess you can also remove "top_srcdir" variable
that is no longer used, right? I see that "lib.mk" uses a variable with
the same name but it overrides its value anyway. But it is likely I
missed something there :)
If indeed it is no longer needed, I guess a few Makefile can be adapted
according to:
git grep top_srcdir -- tools/testing/selftests/*/
I guess most of these Makefile are very similar, no? For MPTCP, we
simply looked at what was done elsewhere :)
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 17/34] selftests: net: Fix incorrect kernel headers search path
2023-01-27 16:21 ` Matthieu Baerts
@ 2023-01-27 16:42 ` Mathieu Desnoyers
0 siblings, 0 replies; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-27 16:42 UTC (permalink / raw)
To: Matthieu Baerts, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, stable
On 2023-01-27 11:21, Matthieu Baerts wrote:
> Hi Mathieu,
>
> On 27/01/2023 14:57, Mathieu Desnoyers wrote:
>> 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=...).
>
> Thank you for the patch!
You're welcome :)
>
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Cc: linux-kselftest@vger.kernel.org
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: <stable@vger.kernel.org> [5.18+]
>
> (It might be useful to add a "Fixes" tag as well to clearly indicate the
> dependence with a specific commit and better understand the fix.)
Just a bit of context: I found this problematic pattern in my own
selftests (rseq and membarrier), and figured that it was an issue all
across the board. I did an initial single-patch fix, and then split it
up in 34 patches based on feedback from Shuah Khan.
I know it should have a Fixed ... tag, but I simply don't have time to
do the historical investigation work for all the 34 patches form this
patchset. Perhaps someone else is up to the task ?
>
> (and add all the individual maintainers of the files you modify -- feel
> free to use 'b4' to help you for this task ;-) )
If this can be automated, then perhaps Shuah can use it to append the
relevant information ?
>
> (...)
>
>> 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)
>
> I only looked at the modification here with MPTCP selftests and it looks
> good to me. It makes sense because if KHDR_INCLUDES is not set, it will
> be set later by lib.mk I suppose.
>
> Just one small thing: I guess you can also remove "top_srcdir" variable
> that is no longer used, right? I see that "lib.mk" uses a variable with
> the same name but it overrides its value anyway. But it is likely I
> missed something there :)
>
> If indeed it is no longer needed, I guess a few Makefile can be adapted
> according to:
>
> git grep top_srcdir -- tools/testing/selftests/*/
>
Yes, this should perhaps come as additional fixes on top of my series. I
don't have time to do it myself though.
Anyone willing to contribute it ?
> I guess most of these Makefile are very similar, no? For MPTCP, we
> simply looked at what was done elsewhere :)
Yes, I did likewise.
Thanks for the feedback,
Mathieu
>
> Cheers,
> Matt
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 01/34] selftests: arm64: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
@ 2023-01-30 16:09 ` Shuah Khan
2023-01-30 17:14 ` Catalin Marinas
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:09 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Catalin Marinas, Will Deacon
Cc: linux-kernel, stable, Linux ARM, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> tools/testing/selftests/arm64/fp/Makefile | 2 +-
> tools/testing/selftests/arm64/tags/Makefile | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
Adding arm maintainers.
Would you me to take this patch through kselftest tree? If you
decide to take this through yours:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 02/34] selftests: bpf: " Mathieu Desnoyers
@ 2023-01-30 16:12 ` Shuah Khan
2023-01-30 16:26 ` Alexei Starovoitov
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:12 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Alexei Starovoitov, Daniel Borkmann
Cc: linux-kernel, stable, bpf, Networking, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [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
Adding bpf maintainers - bpf patches usually go through bpf tree.
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 03/34] selftests: clone3: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 03/34] selftests: clone3: " Mathieu Desnoyers
@ 2023-01-30 16:15 ` Shuah Khan
2023-01-30 16:26 ` Christian Brauner
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:15 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Christian Brauner
Cc: linux-kernel, stable, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> tools/testing/selftests/clone3/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile
> index 79b19a2863a0..84832c369a2e 100644
> --- a/tools/testing/selftests/clone3/Makefile
> +++ b/tools/testing/selftests/clone3/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -CFLAGS += -g -std=gnu99 -I../../../../usr/include/
> +CFLAGS += -g -std=gnu99 $(KHDR_INCLUDES)
> LDLIBS += -lcap
>
> TEST_GEN_PROGS := clone3 clone3_clear_sighand clone3_set_tid \
+ brauner@kernel.org
Hi Christian,
Would you me to take this patch through kselftest tree? If you
decide to take this through yours:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 17/34] selftests: net: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
2023-01-27 16:21 ` Matthieu Baerts
@ 2023-01-30 16:24 ` Shuah Khan
1 sibling, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:24 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
kuba, David S. Miller
Cc: linux-kernel, stable, Shuah Khan, Networking
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [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(-)
>
Adding net maintainers:
Would you me to take this patch through kselftest tree? If you
decide to take this through yours:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 03/34] selftests: clone3: Fix incorrect kernel headers search path
2023-01-30 16:15 ` Shuah Khan
@ 2023-01-30 16:26 ` Christian Brauner
0 siblings, 0 replies; 63+ messages in thread
From: Christian Brauner @ 2023-01-30 16:26 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
linux-kernel, stable
On Mon, Jan 30, 2023 at 09:15:13AM -0700, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > 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 <mathieu.desnoyers@efficios.com>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: <stable@vger.kernel.org> [5.18+]
> > ---
Looks good to me,
Acked-by: Christian Brauner <brauner@kernel.org>
> > tools/testing/selftests/clone3/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile
> > index 79b19a2863a0..84832c369a2e 100644
> > --- a/tools/testing/selftests/clone3/Makefile
> > +++ b/tools/testing/selftests/clone3/Makefile
> > @@ -1,5 +1,5 @@
> > # SPDX-License-Identifier: GPL-2.0
> > -CFLAGS += -g -std=gnu99 -I../../../../usr/include/
> > +CFLAGS += -g -std=gnu99 $(KHDR_INCLUDES)
> > LDLIBS += -lcap
> > TEST_GEN_PROGS := clone3 clone3_clear_sighand clone3_set_tid \
>
> + brauner@kernel.org
>
> Hi Christian,
Hey Shuah,
>
> Would you me to take this patch through kselftest tree? If you
Feel free to take it through the kselftest tree. Thank you!
Christian
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path
2023-01-30 16:12 ` Shuah Khan
@ 2023-01-30 16:26 ` Alexei Starovoitov
2023-01-30 17:00 ` Mathieu Desnoyers
0 siblings, 1 reply; 63+ messages in thread
From: Alexei Starovoitov @ 2023-01-30 16:26 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan,
open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar,
Alexei Starovoitov, Daniel Borkmann, LKML, stable, bpf,
Networking
On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > 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 <mathieu.desnoyers@efficios.com>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: <stable@vger.kernel.org> [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
>
>
>
> Adding bpf maintainers - bpf patches usually go through bpf tree.
>
> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Please resubmit as separate patch with [PATCH bpf-next] subj
and cc bpf@vger, so that BPF CI can test it on various architectures
and config combinations.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 21/34] selftests: powerpc: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 21/34] selftests: powerpc: " Mathieu Desnoyers
@ 2023-01-30 16:32 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:32 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Michael Ellerman
Cc: linux-kernel, stable, linuxppc-dev, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> 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
Adding powerpc maitainers.
Would you me to take this patch through kselftest tree? If you
decide to take this through yours:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 26/34] selftests: sync: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 26/34] selftests: sync: " Mathieu Desnoyers
@ 2023-01-30 16:44 ` Shuah Khan
2023-01-30 16:51 ` Shuah Khan
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:44 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar, Kees Cook
Cc: linux-kernel, stable, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> tools/testing/selftests/sync/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
> index d0121a8a3523..df0f91bf6890 100644
> --- a/tools/testing/selftests/sync/Makefile
> +++ b/tools/testing/selftests/sync/Makefile
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
> -CFLAGS += -I../../../../usr/include/
> +CFLAGS += $(KHDR_INCLUDES)
> LDFLAGS += -pthread
>
> .PHONY: all clean
Adding seccomp maintainers:
kees,
I plan to take this through kselftest unless there are conflicts.
In case there are conflicts and you want to take this through yours
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 26/34] selftests: sync: Fix incorrect kernel headers search path
2023-01-30 16:44 ` Shuah Khan
@ 2023-01-30 16:51 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:51 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar, Kees Cook
Cc: linux-kernel, stable, Shuah Khan
On 1/30/23 09:44, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>> 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 <mathieu.desnoyers@efficios.com>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Cc: linux-kselftest@vger.kernel.org
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: <stable@vger.kernel.org> [5.18+]
>> ---
>> tools/testing/selftests/sync/Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
>> index d0121a8a3523..df0f91bf6890 100644
>> --- a/tools/testing/selftests/sync/Makefile
>> +++ b/tools/testing/selftests/sync/Makefile
>> @@ -1,6 +1,6 @@
>> # SPDX-License-Identifier: GPL-2.0
>> CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
>> -CFLAGS += -I../../../../usr/include/
>> +CFLAGS += $(KHDR_INCLUDES)
>> LDFLAGS += -pthread
>> .PHONY: all clean
>
> Adding seccomp maintainers:
>
> kees,
>
> I plan to take this through kselftest unless there are conflicts.
> In case there are conflicts and you want to take this through yours
>
> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
>
Sorry wrong message. I am taking this one through mine.
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 25/34] selftests: seccomp: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 25/34] selftests: seccomp: " Mathieu Desnoyers
@ 2023-01-30 16:52 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:52 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, stable, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> tools/testing/selftests/seccomp/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index f017c382c036..584fba487037 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -CFLAGS += -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/
> +CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
> LDFLAGS += -lpthread
> LDLIBS += -lcap
>
Now the right one.
Kees,
I plan to take this through kselftest unless there are conflicts.
In case there are conflicts and you want to take this through yours
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 28/34] selftests: vm: Fix incorrect kernel headers search path
2023-01-27 13:57 ` [PATCH 28/34] selftests: vm: " Mathieu Desnoyers
@ 2023-01-30 16:55 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:55 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Andrew Morton
Cc: linux-kernel, stable, Shuah Khan, Linux Memory Management List
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: <stable@vger.kernel.org> [5.18+]
> ---
> tools/testing/selftests/vm/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
> index 89c14e41bd43..ac9366065fd2 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -25,7 +25,7 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/p
> # LDLIBS.
> MAKEFLAGS += --no-builtin-rules
>
> -CFLAGS = -Wall -I $(top_srcdir) -I $(top_srcdir)/usr/include $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
> +CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES)
> LDLIBS = -lrt -lpthread
> TEST_GEN_FILES = cow
> TEST_GEN_FILES += compaction_test
Adding mm maintainers.
Andrew,
Would you me to take this patch through kselftest tree? If you
decide to take this through yours:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 30/34] selftests: bpf docs: Use installed kernel headers search path
2023-01-27 13:57 ` [PATCH 30/34] selftests: bpf docs: Use installed " Mathieu Desnoyers
@ 2023-01-30 16:57 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 16:57 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Alexei Starovoitov, Daniel Borkmann
Cc: linux-kernel, bpf, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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 <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
> 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 $$< > $$@
>
Adding bpf maintainers.
Here is my ack:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path
2023-01-30 16:26 ` Alexei Starovoitov
@ 2023-01-30 17:00 ` Mathieu Desnoyers
2023-01-30 17:09 ` Shuah Khan
0 siblings, 1 reply; 63+ messages in thread
From: Mathieu Desnoyers @ 2023-01-30 17:00 UTC (permalink / raw)
To: Alexei Starovoitov, Shuah Khan
Cc: Shuah Khan, open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar,
Alexei Starovoitov, Daniel Borkmann, LKML, stable, bpf,
Networking
On 2023-01-30 11:26, Alexei Starovoitov wrote:
> On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>
>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>> 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 <mathieu.desnoyers@efficios.com>
>>> Cc: Shuah Khan <shuah@kernel.org>
>>> Cc: linux-kselftest@vger.kernel.org
>>> Cc: Ingo Molnar <mingo@redhat.com>
>>> Cc: <stable@vger.kernel.org> [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
>>
>>
>>
>> Adding bpf maintainers - bpf patches usually go through bpf tree.
>>
>> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
>
> Please resubmit as separate patch with [PATCH bpf-next] subj
> and cc bpf@vger, so that BPF CI can test it on various architectures
> and config combinations.
Hi Shuah,
Do you have means to resubmit it on your end, or should I do it ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 31/34] selftests: iommu: Use installed kernel headers search path
2023-01-27 13:57 ` [PATCH 31/34] selftests: iommu: " Mathieu Desnoyers
@ 2023-01-30 17:01 ` Shuah Khan
2023-01-30 17:05 ` Jason Gunthorpe
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 17:01 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Jason Gunthorpe
Cc: linux-kernel, iommu, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> 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.
>
> Remove bogus ../../../../include/ from the search path, because
> kernel source headers are not needed by those user-space selftests, and
> it causes issues because -I paths are searched before -isystem paths,
> and conflicts for files appearing both in kernel sources and in uapi
> headers with incompatible semantics (e.g. types.h).
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
> tools/testing/selftests/iommu/Makefile | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/iommu/Makefile b/tools/testing/selftests/iommu/Makefile
> index 7cb74d26f141..32c5fdfd0eef 100644
> --- a/tools/testing/selftests/iommu/Makefile
> +++ b/tools/testing/selftests/iommu/Makefile
> @@ -1,7 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only
> CFLAGS += -Wall -O2 -Wno-unused-function
> -CFLAGS += -I../../../../include/uapi/
> -CFLAGS += -I../../../../include/
> +CFLAGS += $(KHDR_INCLUDES)
>
> CFLAGS += -D_GNU_SOURCE
>
Adding iommu test maintainers:
I plan to take this through kselftest unless there are conflicts.
In case there are conflicts and you want to take this through yours
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 31/34] selftests: iommu: Use installed kernel headers search path
2023-01-30 17:01 ` Shuah Khan
@ 2023-01-30 17:05 ` Jason Gunthorpe
0 siblings, 0 replies; 63+ messages in thread
From: Jason Gunthorpe @ 2023-01-30 17:05 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
linux-kernel, iommu
On Mon, Jan 30, 2023 at 10:01:23AM -0700, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > 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.
> >
> > Remove bogus ../../../../include/ from the search path, because
> > kernel source headers are not needed by those user-space selftests, and
> > it causes issues because -I paths are searched before -isystem paths,
> > and conflicts for files appearing both in kernel sources and in uapi
> > headers with incompatible semantics (e.g. types.h).
> >
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: Ingo Molnar <mingo@redhat.com>
> > ---
> > tools/testing/selftests/iommu/Makefile | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/iommu/Makefile b/tools/testing/selftests/iommu/Makefile
> > index 7cb74d26f141..32c5fdfd0eef 100644
> > --- a/tools/testing/selftests/iommu/Makefile
> > +++ b/tools/testing/selftests/iommu/Makefile
> > @@ -1,7 +1,6 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > CFLAGS += -Wall -O2 -Wno-unused-function
> > -CFLAGS += -I../../../../include/uapi/
> > -CFLAGS += -I../../../../include/
> > +CFLAGS += $(KHDR_INCLUDES)
> > CFLAGS += -D_GNU_SOURCE
>
> Adding iommu test maintainers:
>
> I plan to take this through kselftest unless there are conflicts.
> In case there are conflicts and you want to take this through yours
>
> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Go ahead please
Jason
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 02/34] selftests: bpf: Fix incorrect kernel headers search path
2023-01-30 17:00 ` Mathieu Desnoyers
@ 2023-01-30 17:09 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 17:09 UTC (permalink / raw)
To: Mathieu Desnoyers, Alexei Starovoitov
Cc: Shuah Khan, open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar,
Alexei Starovoitov, Daniel Borkmann, LKML, stable, bpf,
Networking, Shuah Khan
On 1/30/23 10:00, Mathieu Desnoyers wrote:
> On 2023-01-30 11:26, Alexei Starovoitov wrote:
>> On Mon, Jan 30, 2023 at 8:12 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>
>>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>>> 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 <mathieu.desnoyers@efficios.com>
>>>> Cc: Shuah Khan <shuah@kernel.org>
>>>> Cc: linux-kselftest@vger.kernel.org
>>>> Cc: Ingo Molnar <mingo@redhat.com>
>>>> Cc: <stable@vger.kernel.org> [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
>>>
>>>
>>>
>>> Adding bpf maintainers - bpf patches usually go through bpf tree.
>>>
>>> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
>>
>> Please resubmit as separate patch with [PATCH bpf-next] subj
>> and cc bpf@vger, so that BPF CI can test it on various architectures
>> and config combinations.
>
> Hi Shuah,
>
> Do you have means to resubmit it on your end, or should I do it ?
>
Hi Mathieu,
Please go ahead and resubmit.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 01/34] selftests: arm64: Fix incorrect kernel headers search path
2023-01-30 16:09 ` Shuah Khan
@ 2023-01-30 17:14 ` Catalin Marinas
2023-01-30 17:20 ` Shuah Khan
0 siblings, 1 reply; 63+ messages in thread
From: Catalin Marinas @ 2023-01-30 17:14 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Will Deacon, linux-kernel, stable, Linux ARM
Hi Shuah,
On Mon, Jan 30, 2023 at 09:09:42AM -0700, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > 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 <mathieu.desnoyers@efficios.com>
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: <stable@vger.kernel.org> [5.18+]
> > ---
> > tools/testing/selftests/arm64/fp/Makefile | 2 +-
> > tools/testing/selftests/arm64/tags/Makefile | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
>
> Adding arm maintainers.
>
> Would you me to take this patch through kselftest tree? If you
> decide to take this through yours:
Are you taking the whole series? If yes:
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
(otherwise I can pick this up)
--
Catalin
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 01/34] selftests: arm64: Fix incorrect kernel headers search path
2023-01-30 17:14 ` Catalin Marinas
@ 2023-01-30 17:20 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 17:20 UTC (permalink / raw)
To: Catalin Marinas
Cc: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar,
Will Deacon, linux-kernel, stable, Linux ARM, Shuah Khan
On 1/30/23 10:14, Catalin Marinas wrote:
> Hi Shuah,
>
> On Mon, Jan 30, 2023 at 09:09:42AM -0700, Shuah Khan wrote:
>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>> 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 <mathieu.desnoyers@efficios.com>
>>> Cc: Shuah Khan <shuah@kernel.org>
>>> Cc: linux-kselftest@vger.kernel.org
>>> Cc: Ingo Molnar <mingo@redhat.com>
>>> Cc: <stable@vger.kernel.org> [5.18+]
>>> ---
>>> tools/testing/selftests/arm64/fp/Makefile | 2 +-
>>> tools/testing/selftests/arm64/tags/Makefile | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>
>> Adding arm maintainers.
>>
>> Would you me to take this patch through kselftest tree? If you
>> decide to take this through yours:
>
> Are you taking the whole series? If yes:
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>
> (otherwise I can pick this up)
>
I am taking several patches in the series with an exception
when maintainers want to take them through theirs.
I will apply to mine and take this through.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (33 preceding siblings ...)
2023-01-27 13:57 ` [PATCH 34/34] selftests: tdx: " Mathieu Desnoyers
@ 2023-01-30 22:29 ` Shuah Khan
2023-01-30 23:45 ` Alexei Starovoitov
2023-02-02 2:07 ` Shuah Khan
2023-02-20 3:49 ` (subset) " Michael Ellerman
35 siblings, 2 replies; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 22:29 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, bpf, Networking, linuxppc-dev, Shuah Khan
On 1/27/23 06:57, Mathieu Desnoyers wrote:
> Hi,
>
> This series fixes incorrect kernel header search path in kernel
> selftests.
>
> Near the end of the series, a few changes are not tagged as "Fixes"
> because the current behavior is to rely on the kernel sources uapi files
> rather than on the installed kernel header files. Nevertheless, those
> are updated for consistency.
>
> There are situations where "../../../../include/" was added to -I search
> path, which is bogus for userspace tests and caused issues with types.h.
> Those are removed.
>
> Thanks,
>
> Mathieu
>
> Mathieu Desnoyers (34):
The below patches are now applied to linux-kselftest next for Linux 6.3-rc1
> selftests: arm64: Fix incorrect kernel headers search path
> selftests: clone3: Fix incorrect kernel headers search path
> selftests: core: Fix incorrect kernel headers search path
> selftests: dma: Fix incorrect kernel headers search path
> selftests: dmabuf-heaps: Fix incorrect kernel headers search path
> selftests: drivers: Fix incorrect kernel headers search path
> selftests: filesystems: Fix incorrect kernel headers search path
> selftests: futex: Fix incorrect kernel headers search path
> selftests: gpio: Fix incorrect kernel headers search path
> selftests: ipc: Fix incorrect kernel headers search path
> selftests: kcmp: Fix incorrect kernel headers search path
> selftests: media_tests: Fix incorrect kernel headers search path
> selftests: membarrier: Fix incorrect kernel headers search path
> selftests: mount_setattr: Fix incorrect kernel headers search path
> selftests: move_mount_set_group: Fix incorrect kernel headers search
> path
> selftests: perf_events: Fix incorrect kernel headers search path
> selftests: pid_namespace: Fix incorrect kernel headers search path
> selftests: pidfd: Fix incorrect kernel headers search path
> selftests: ptp: Fix incorrect kernel headers search path
> selftests: rseq: Fix incorrect kernel headers search path
> selftests: sched: Fix incorrect kernel headers search path
> selftests: seccomp: Fix incorrect kernel headers search path
> selftests: sync: Fix incorrect kernel headers search path
> selftests: user_events: Fix incorrect kernel headers search path
> selftests: vm: Fix incorrect kernel headers search path
> selftests: x86: Fix incorrect kernel headers search path
> selftests: iommu: Use installed kernel headers search path
> selftests: memfd: Use installed kernel headers search path
> selftests: ptrace: Use installed kernel headers search path
> selftests: tdx: Use installed kernel headers search path
>
These will be applied by maintainers to their trees.
> selftests: bpf: Fix incorrect kernel headers search path # 02/34
> selftests: net: Fix incorrect kernel headers search path # 17/34
> selftests: powerpc: Fix incorrect kernel headers search path # 21/34
> selftests: bpf docs: Use installed kernel headers search path # 30/34
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
@ 2023-01-30 23:45 ` Alexei Starovoitov
2023-01-30 23:48 ` Shuah Khan
2023-02-02 2:07 ` Shuah Khan
1 sibling, 1 reply; 63+ messages in thread
From: Alexei Starovoitov @ 2023-01-30 23:45 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan,
open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar, LKML, bpf,
Networking, ppc-dev
On Mon, Jan 30, 2023 at 2:46 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
> > Hi,
> >
> > This series fixes incorrect kernel header search path in kernel
> > selftests.
> >
> > Near the end of the series, a few changes are not tagged as "Fixes"
> > because the current behavior is to rely on the kernel sources uapi files
> > rather than on the installed kernel header files. Nevertheless, those
> > are updated for consistency.
> >
> > There are situations where "../../../../include/" was added to -I search
> > path, which is bogus for userspace tests and caused issues with types.h.
> > Those are removed.
> >
> > Thanks,
> >
> > Mathieu
> >
> > Mathieu Desnoyers (34):
>
> The below patches are now applied to linux-kselftest next for Linux 6.3-rc1
>
> > selftests: arm64: Fix incorrect kernel headers search path
> > selftests: clone3: Fix incorrect kernel headers search path
> > selftests: core: Fix incorrect kernel headers search path
> > selftests: dma: Fix incorrect kernel headers search path
> > selftests: dmabuf-heaps: Fix incorrect kernel headers search path
> > selftests: drivers: Fix incorrect kernel headers search path
> > selftests: filesystems: Fix incorrect kernel headers search path
> > selftests: futex: Fix incorrect kernel headers search path
> > selftests: gpio: Fix incorrect kernel headers search path
> > selftests: ipc: Fix incorrect kernel headers search path
> > selftests: kcmp: Fix incorrect kernel headers search path
> > selftests: media_tests: Fix incorrect kernel headers search path
> > selftests: membarrier: Fix incorrect kernel headers search path
> > selftests: mount_setattr: Fix incorrect kernel headers search path
> > selftests: move_mount_set_group: Fix incorrect kernel headers search
> > path
> > selftests: perf_events: Fix incorrect kernel headers search path
> > selftests: pid_namespace: Fix incorrect kernel headers search path
> > selftests: pidfd: Fix incorrect kernel headers search path
> > selftests: ptp: Fix incorrect kernel headers search path
> > selftests: rseq: Fix incorrect kernel headers search path
> > selftests: sched: Fix incorrect kernel headers search path
> > selftests: seccomp: Fix incorrect kernel headers search path
> > selftests: sync: Fix incorrect kernel headers search path
> > selftests: user_events: Fix incorrect kernel headers search path
> > selftests: vm: Fix incorrect kernel headers search path
> > selftests: x86: Fix incorrect kernel headers search path
> > selftests: iommu: Use installed kernel headers search path
> > selftests: memfd: Use installed kernel headers search path
> > selftests: ptrace: Use installed kernel headers search path
> > selftests: tdx: Use installed kernel headers search path
> >
>
> These will be applied by maintainers to their trees.
Not in this form. They break the build.
> > selftests: bpf: Fix incorrect kernel headers search path # 02/34
> > selftests: net: Fix incorrect kernel headers search path # 17/34
> > selftests: powerpc: Fix incorrect kernel headers search path # 21/34
> > selftests: bpf docs: Use installed kernel headers search path # 30/34
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-30 23:45 ` Alexei Starovoitov
@ 2023-01-30 23:48 ` Shuah Khan
2023-01-30 23:49 ` Alexei Starovoitov
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-01-30 23:48 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Mathieu Desnoyers, Shuah Khan,
open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar, LKML, bpf,
Networking, ppc-dev, Shuah Khan
On 1/30/23 16:45, Alexei Starovoitov wrote:
> On Mon, Jan 30, 2023 at 2:46 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>>
>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>> Hi,
>>>
>>> This series fixes incorrect kernel header search path in kernel
>>> selftests.
>>>
>>> Near the end of the series, a few changes are not tagged as "Fixes"
>>> because the current behavior is to rely on the kernel sources uapi files
>>> rather than on the installed kernel header files. Nevertheless, those
>>> are updated for consistency.
>>>
>>> There are situations where "../../../../include/" was added to -I search
>>> path, which is bogus for userspace tests and caused issues with types.h.
>>> Those are removed.
>>>
>>> Thanks,
>>>
>>> Mathieu
>>>
>>> Mathieu Desnoyers (34):
>>
>> The below patches are now applied to linux-kselftest next for Linux 6.3-rc1
>>
>>> selftests: arm64: Fix incorrect kernel headers search path
>>> selftests: clone3: Fix incorrect kernel headers search path
>>> selftests: core: Fix incorrect kernel headers search path
>>> selftests: dma: Fix incorrect kernel headers search path
>>> selftests: dmabuf-heaps: Fix incorrect kernel headers search path
>>> selftests: drivers: Fix incorrect kernel headers search path
>>> selftests: filesystems: Fix incorrect kernel headers search path
>>> selftests: futex: Fix incorrect kernel headers search path
>>> selftests: gpio: Fix incorrect kernel headers search path
>>> selftests: ipc: Fix incorrect kernel headers search path
>>> selftests: kcmp: Fix incorrect kernel headers search path
>>> selftests: media_tests: Fix incorrect kernel headers search path
>>> selftests: membarrier: Fix incorrect kernel headers search path
>>> selftests: mount_setattr: Fix incorrect kernel headers search path
>>> selftests: move_mount_set_group: Fix incorrect kernel headers search
>>> path
>>> selftests: perf_events: Fix incorrect kernel headers search path
>>> selftests: pid_namespace: Fix incorrect kernel headers search path
>>> selftests: pidfd: Fix incorrect kernel headers search path
>>> selftests: ptp: Fix incorrect kernel headers search path
>>> selftests: rseq: Fix incorrect kernel headers search path
>>> selftests: sched: Fix incorrect kernel headers search path
>>> selftests: seccomp: Fix incorrect kernel headers search path
>>> selftests: sync: Fix incorrect kernel headers search path
>>> selftests: user_events: Fix incorrect kernel headers search path
>>> selftests: vm: Fix incorrect kernel headers search path
>>> selftests: x86: Fix incorrect kernel headers search path
>>> selftests: iommu: Use installed kernel headers search path
>>> selftests: memfd: Use installed kernel headers search path
>>> selftests: ptrace: Use installed kernel headers search path
>>> selftests: tdx: Use installed kernel headers search path
>>>
>>
>> These will be applied by maintainers to their trees.
>
> Not in this form. They break the build.
Mathieu is sending you the patches in the format you requested in
the thread on this patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-30 23:48 ` Shuah Khan
@ 2023-01-30 23:49 ` Alexei Starovoitov
0 siblings, 0 replies; 63+ messages in thread
From: Alexei Starovoitov @ 2023-01-30 23:49 UTC (permalink / raw)
To: Shuah Khan
Cc: Mathieu Desnoyers, Shuah Khan,
open list:KERNEL SELFTEST FRAMEWORK, Ingo Molnar, LKML, bpf,
Networking, ppc-dev
On Mon, Jan 30, 2023 at 3:48 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> >>
> >> These will be applied by maintainers to their trees.
> >
> > Not in this form. They break the build.
>
> Mathieu is sending you the patches in the format you requested in
> the thread on this patch.
It's not the format, but the patch itself is incorrect.
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
2023-01-30 23:45 ` Alexei Starovoitov
@ 2023-02-02 2:07 ` Shuah Khan
2023-02-04 1:06 ` Shuah Khan
1 sibling, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-02-02 2:07 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, bpf, Networking, linuxppc-dev, Shuah Khan
Hi Mathieu,
On 1/30/23 15:29, Shuah Khan wrote:
> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>> Hi,
>>
>> This series fixes incorrect kernel header search path in kernel
>> selftests.
>>
>> Near the end of the series, a few changes are not tagged as "Fixes"
>> because the current behavior is to rely on the kernel sources uapi files
>> rather than on the installed kernel header files. Nevertheless, those
>> are updated for consistency.
>>
>> There are situations where "../../../../include/" was added to -I search
>> path, which is bogus for userspace tests and caused issues with types.h.
>> Those are removed.
>>
Thanks again for taking care of this. I did out of tree build testing on
x86 on linux-kselftest next with these patches below. I haven't seen
any problems introduced by the patch set.
>> selftests: dma: Fix incorrect kernel headers search path
This one needs a change and I will send a patch on top of yours.
Even with that this test depends on unexported header from the
repo and won't build out of tree. This is not related to your
change.
>> selftests: mount_setattr: Fix incorrect kernel headers search path
This one fails to build with our without patch - an existing error.
I have to do cross-build tests on arm64 and other arch patches still.
This will happen later this week.
>> selftests: arm64: Fix incorrect kernel headers search path
drivers patch below had arch specific tests - testing todo
The rest looks good. I will try to run bpf patches on my system.
I do have clang, llvm installed on mine. TODO
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-02-02 2:07 ` Shuah Khan
@ 2023-02-04 1:06 ` Shuah Khan
2023-02-11 0:15 ` Shuah Khan
0 siblings, 1 reply; 63+ messages in thread
From: Shuah Khan @ 2023-02-04 1:06 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Ingo Molnar
Cc: linux-kernel, bpf, Networking, linuxppc-dev, Shuah Khan
On 2/1/23 19:07, Shuah Khan wrote:
> Hi Mathieu,
>
> On 1/30/23 15:29, Shuah Khan wrote:
>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>> Hi,
>>>
>>> This series fixes incorrect kernel header search path in kernel
>>> selftests.
>>>
>>> Near the end of the series, a few changes are not tagged as "Fixes"
>>> because the current behavior is to rely on the kernel sources uapi files
>>> rather than on the installed kernel header files. Nevertheless, those
>>> are updated for consistency.
>>>
>>> There are situations where "../../../../include/" was added to -I search
>>> path, which is bogus for userspace tests and caused issues with types.h.
>>> Those are removed.
>>>
>
> Thanks again for taking care of this. I did out of tree build testing on
> x86 on linux-kselftest next with these patches below. I haven't seen
> any problems introduced by the patch set.
>
>>> selftests: dma: Fix incorrect kernel headers search path
> This one needs a change and I will send a patch on top of yours.
> Even with that this test depends on unexported header from the
> repo and won't build out of tree. This is not related to your
> change.
>
>>> selftests: mount_setattr: Fix incorrect kernel headers search path
> This one fails to build with our without patch - an existing error.
>
> I have to do cross-build tests on arm64 and other arch patches still.
> This will happen later this week.
arm64, s390 patches look good.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-02-04 1:06 ` Shuah Khan
@ 2023-02-11 0:15 ` Shuah Khan
0 siblings, 0 replies; 63+ messages in thread
From: Shuah Khan @ 2023-02-11 0:15 UTC (permalink / raw)
To: Mathieu Desnoyers, Shuah Khan, linux-kselftest, Steven Rostedt,
Christoph Hellwig
Cc: linux-kernel, bpf, Networking, Ingo Molnar, linuxppc-dev
On 2/3/23 18:06, Shuah Khan wrote:
> On 2/1/23 19:07, Shuah Khan wrote:
>> Hi Mathieu,
>>
>> On 1/30/23 15:29, Shuah Khan wrote:
>>> On 1/27/23 06:57, Mathieu Desnoyers wrote:
>>>> Hi,
>>>>
>>>> This series fixes incorrect kernel header search path in kernel
>>>> selftests.
>>>>
>>>> Near the end of the series, a few changes are not tagged as "Fixes"
>>>> because the current behavior is to rely on the kernel sources uapi files
>>>> rather than on the installed kernel header files. Nevertheless, those
>>>> are updated for consistency.
>>>>
>>>> There are situations where "../../../../include/" was added to -I search
>>>> path, which is bogus for userspace tests and caused issues with types.h.
>>>> Those are removed.
>>>>
>>
>> Thanks again for taking care of this. I did out of tree build testing on
>> x86 on linux-kselftest next with these patches below. I haven't seen
>> any problems introduced by the patch set.
>>
>>>> selftests: dma: Fix incorrect kernel headers search path
>> This one needs a change and I will send a patch on top of yours.
>> Even with that this test depends on unexported header from the
>> repo and won't build out of tree. This is not related to your
>> change.
>>
>>>> selftests: mount_setattr: Fix incorrect kernel headers search path
>> This one fails to build with our without patch - an existing error.
>>
>> I have to do cross-build tests on arm64 and other arch patches still.
>> This will happen later this week.
>
> arm64, s390 patches look good.
>
I am seeing problem with selftests/dma and selfttests/user_events.
1. selftests: dma: Fix incorrect kernel headers search path
dma test no longer builds. This test depends on linux/map_benchmark.h
which is not included in uapi
The order of include directorries -isystem followed by installed kernel
headers, breaks the test build with the change to use KHDR_INCLUDES
I am going to revert this patch for now and figure a longer term fix.
The problem is the dependency on a non-uapi file: linux/map_benchmark.h
Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common
header file for map_benchmark definition") change added this
dependency on including linux/map_benchmark.h
Christoph, Do you see this map_benchmark.h as part of uapi?
2. selftests: user_events: Fix incorrect kernel headers search path
This one depends on linux/user_events.h which has bee removed from
uapi in this commit:
commit 5cfff569cab8bf544bab62c911c5d6efd5af5e05
Author: Steven Rostedt (Google) <rostedt@goodmis.org>
Date: Fri Apr 1 14:39:03 2022 -0400
tracing: Move user_events.h temporarily out of include/uapi
This isn't a regression from 6.2 - this test stopped building once
user_events.h has been removed from uapi. I will add a note that
this test depends on a non-uapi header and can't be built at the
moment.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: (subset) [PATCH 00/34] selftests: Fix incorrect kernel headers search path
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
` (34 preceding siblings ...)
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
@ 2023-02-20 3:49 ` Michael Ellerman
35 siblings, 0 replies; 63+ messages in thread
From: Michael Ellerman @ 2023-02-20 3:49 UTC (permalink / raw)
To: Shuah Khan, Ingo Molnar, linux-kselftest, Mathieu Desnoyers; +Cc: linux-kernel
On Fri, 27 Jan 2023 08:57:21 -0500, Mathieu Desnoyers wrote:
> This series fixes incorrect kernel header search path in kernel
> selftests.
>
> Near the end of the series, a few changes are not tagged as "Fixes"
> because the current behavior is to rely on the kernel sources uapi files
> rather than on the installed kernel header files. Nevertheless, those
> are updated for consistency.
>
> [...]
Applied to powerpc/next.
[21/34] selftests: powerpc: Fix incorrect kernel headers search path
https://git.kernel.org/powerpc/c/4f11410bf6da87defe8fd59b0413f0d9f71744da
cheers
^ permalink raw reply [flat|nested] 63+ messages in thread
end of thread, other threads:[~2023-02-20 3:51 UTC | newest]
Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
2023-01-30 16:09 ` Shuah Khan
2023-01-30 17:14 ` Catalin Marinas
2023-01-30 17:20 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 02/34] selftests: bpf: " Mathieu Desnoyers
2023-01-30 16:12 ` Shuah Khan
2023-01-30 16:26 ` Alexei Starovoitov
2023-01-30 17:00 ` Mathieu Desnoyers
2023-01-30 17:09 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 03/34] selftests: clone3: " Mathieu Desnoyers
2023-01-30 16:15 ` Shuah Khan
2023-01-30 16:26 ` Christian Brauner
2023-01-27 13:57 ` [PATCH 04/34] selftests: core: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 05/34] selftests: dma: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 06/34] selftests: dmabuf-heaps: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 07/34] selftests: drivers: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 08/34] selftests: filesystems: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 09/34] selftests: futex: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 10/34] selftests: gpio: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 11/34] selftests: ipc: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 12/34] selftests: kcmp: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 13/34] selftests: media_tests: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 14/34] selftests: membarrier: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 15/34] selftests: mount_setattr: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 16/34] selftests: move_mount_set_group: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
2023-01-27 16:21 ` Matthieu Baerts
2023-01-27 16:42 ` Mathieu Desnoyers
2023-01-30 16:24 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 18/34] selftests: perf_events: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 19/34] selftests: pid_namespace: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 20/34] selftests: pidfd: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 21/34] selftests: powerpc: " Mathieu Desnoyers
2023-01-30 16:32 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 22/34] selftests: ptp: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 23/34] selftests: rseq: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 24/34] selftests: sched: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 25/34] selftests: seccomp: " Mathieu Desnoyers
2023-01-30 16:52 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 26/34] selftests: sync: " Mathieu Desnoyers
2023-01-30 16:44 ` Shuah Khan
2023-01-30 16:51 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 27/34] selftests: user_events: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 28/34] selftests: vm: " Mathieu Desnoyers
2023-01-30 16:55 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 29/34] selftests: x86: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 30/34] selftests: bpf docs: Use installed " Mathieu Desnoyers
2023-01-30 16:57 ` Shuah Khan
2023-01-27 13:57 ` [PATCH 31/34] selftests: iommu: " Mathieu Desnoyers
2023-01-30 17:01 ` Shuah Khan
2023-01-30 17:05 ` Jason Gunthorpe
2023-01-27 13:57 ` [PATCH 32/34] selftests: memfd: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 33/34] selftests: ptrace: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 34/34] selftests: tdx: " Mathieu Desnoyers
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
2023-01-30 23:45 ` Alexei Starovoitov
2023-01-30 23:48 ` Shuah Khan
2023-01-30 23:49 ` Alexei Starovoitov
2023-02-02 2:07 ` Shuah Khan
2023-02-04 1:06 ` Shuah Khan
2023-02-11 0:15 ` Shuah Khan
2023-02-20 3:49 ` (subset) " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).