[PATCH] selftests/exec: Fix check-exec-tests.sh with O=

刘思宇 posted 1 patch 1 month ago
tools/testing/selftests/exec/Makefile | 1 +
1 file changed, 1 insertion(+)
[PATCH] selftests/exec: Fix check-exec-tests.sh with O=
Posted by 刘思宇 1 month ago
When running the exec selftests out-of-tree with O=,
check-exec-tests.sh is copied to the output directory without its
ktap_helpers.sh dependency. The script therefore fails to source the
helper and exits before emitting TAP output.

Add ktap_helpers.sh to TEST_INCLUDES so lib.mk copies it to the
out-of-tree layout.

Fixes: 2a69962be4a7 ("samples/check-exec: Add an enlighten "inc" interpreter and 28 tests")
Signed-off-by: 刘思宇 <2028566723@qq.com>
---
 tools/testing/selftests/exec/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index b640af8f02b5..d16ad3d32770 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -16,6 +16,7 @@ TEST_GEN_PROGS_EXTENDED := false inc set-exec script-exec.inc script-noexec.inc
 TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
 # Makefile is a run-time dependency, since it's accessed by the execveat test
 TEST_FILES := Makefile
+TEST_INCLUDES := ../kselftest/ktap_helpers.sh
 
 TEST_GEN_PROGS += recursion-depth
 TEST_GEN_PROGS += null-argv

base-commit: 45c13f3f9e3bb15fd89ff2864c6f627a3b4b4229
-- 
2.55.0