From: Mathieu Desnoyers Date: Fri, 27 Jan 2023 13:57:55 +0000 (-0500) Subject: selftests: tdx: Use installed kernel headers search path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5adbe55c8ba5c2d03add62386e4722d273e5b893;p=linux.git selftests: tdx: 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. Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/tdx/Makefile b/tools/testing/selftests/tdx/Makefile index 8dd43517cd55d..306e9c4d5ef7c 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 2a2afd856798b..81d8cb88ea1ad 100644 --- a/tools/testing/selftests/tdx/tdx_guest_test.c +++ b/tools/testing/selftests/tdx/tdx_guest_test.c @@ -12,8 +12,8 @@ #include #include +#include #include "../kselftest_harness.h" -#include "../../../../include/uapi/linux/tdx-guest.h" #define TDX_GUEST_DEVNAME "/dev/tdx_guest" #define HEX_DUMP_SIZE 8