]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
selftests: filesystems: Fix incorrect kernel headers search path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 27 Jan 2023 13:57:29 +0000 (08:57 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:29 +0000 (16:47 +0100)
BugLink: https://bugs.launchpad.net/bugs/2011425
commit c2d3cf3653a8ff6e4b402d55e7f84790ac08a8ad upstream.

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+
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
tools/testing/selftests/filesystems/Makefile
tools/testing/selftests/filesystems/binderfs/Makefile
tools/testing/selftests/filesystems/epoll/Makefile

index 129880fb42d34c04c343dc88875515dbbb27df91..c647fd6a0446ab9aae58fdab770743e35bab8099 100644 (file)
@@ -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
 
index 8af25ae9604982ec3be1a68a33da77ba8f3b524a..c2f7cef919c04566037582e017cb2d7b55b7a33f 100644 (file)
@@ -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
index 78ae4aaf7141ad285847b94adf52c87229208520..0788a7dc80042df765efd0b216f6994f445f405d 100644 (file)
@@ -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