From: Wen Yang <[email protected]> verificationtest-ktap used CWD-relative paths which broke when invoked outside the verification directory (e.g. via vng).
Resolve paths via realpath "$(dirname "$0")" so the script works from any working directory. Accept an optional subdirectory argument interpreted relative to the script's directory. Suggested-by: Gabriele Monaco <[email protected]> Signed-off-by: Wen Yang <[email protected]> --- tools/testing/selftests/verification/verificationtest-ktap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/verification/verificationtest-ktap b/tools/testing/selftests/verification/verificationtest-ktap index 18f7fe324e2f..055747cef38a 100755 --- a/tools/testing/selftests/verification/verificationtest-ktap +++ b/tools/testing/selftests/verification/verificationtest-ktap @@ -5,4 +5,6 @@ # # Copyright (C) Arm Ltd., 2023 -../ftrace/ftracetest -K -v --rv ../verification +dir=$(realpath "$(dirname "$0")") +testdir=$(cd "$dir" && realpath "${1:-.}") +"$dir/../ftrace/ftracetest" -K -v --rv "$testdir" -- 2.43.0
