On Wed, 22 Oct 2025 at 08:29, Bala-Vignesh-Reddy reddybalavignesh9979@gmail.com wrote:
The previous change centralizing kselftest.h include path in lib.mk caused x86 selftests to fail, as x86 Makefile overwrites CFLAGS using ":=", dropping the include path added in lib.mk. Therefore, helpers.h could not find kselftest.h during compilation.
Fix this by adding the tools/testing/sefltest to CFLAGS in x86 Makefile.
Fixes: 4d89827dfb27 ("selftests: complete kselftest include centralization") Reported-by: Linux Kernel Functional Testing lkft@linaro.org Closes: https://lore.kernel.org/lkml/CA+G9fYvKjQcCBMfXA-z2YuL2L+3Qd-pJjEUDX8PDdz2-EE...
Signed-off-by: Bala-Vignesh-Reddy reddybalavignesh9979@gmail.com
Yes, works.
Tested-by: Anders Roxell anders.roxell@linaro.org
Cheers, Anders
tools/testing/selftests/x86/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 83148875a12c..434065215d12 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -36,6 +36,7 @@ BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
CFLAGS := -O2 -g -std=gnu99 -pthread -Wall $(KHDR_INCLUDES) +CFLAGS += -I $(top_srcdir)/tools/testing/selftests/
# call32_from_64 in thunks.S uses absolute addresses. ifeq ($(CAN_BUILD_WITH_NOPIE),1) -- 2.43.0