selftests: memfd: Use installed kernel headers search path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 27 Jan 2023 13:57:53 +0000 (08:57 -0500)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Feb 2023 16:09:46 +0000 (09:09 -0700)
commita24ebb4937034e3b9459a5faf353c26af27f62be
tree1b65fbb44dc5341c3c65c127c04df772bdb04985
parent0d7a91678aaacf8e2f532c3e04a276af06b42d1c
selftests: memfd: Use installed kernel headers search path

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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/memfd/Makefile