From: tanze Date: Thu, 15 May 2025 05:18:39 +0000 (+0800) Subject: kselftest/arm64: Set default OUTPUT path when undefined X-Git-Tag: v6.16-rc1~39^2~6^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b225219a4002aae9b5d71cf0f912ac02d38f0212;p=linux-block.git kselftest/arm64: Set default OUTPUT path when undefined 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 Link: https://lore.kernel.org/r/20250515051839.3409658-1-tanze@kylinos.cn Signed-off-by: Will Deacon --- 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