[PATCH] kselftest/arm64: Set default OUTPUT path when undefined

tanze tanze at kylinos.cn
Wed May 14 22:18:39 PDT 2025


When running 'make' in tools/testing/selftests/arm64/ without explicitly
setting the OUTPUT variable, the build system will creates test
directories (e.g., /bti) in the root filesystem due to OUTPUT defaulting
to an empty string. This causes unintended pollution of the root directory.

This patch adds proper handling for the OUTPUT variable: Sets OUTPUT
to the current directory (.) if not specified

Signed-off-by: tanze <tanze at kylinos.cn>
---
 tools/testing/selftests/arm64/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile
index 22029e60eff3..c4c72ee2ef55 100644
--- a/tools/testing/selftests/arm64/Makefile
+++ b/tools/testing/selftests/arm64/Makefile
@@ -21,6 +21,8 @@ CFLAGS += $(KHDR_INCLUDES)
 
 CFLAGS += -I$(top_srcdir)/tools/include
 
+OUTPUT ?= $(CURDIR)
+
 export CFLAGS
 export top_srcdir
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list