On Mon, 2026-06-08 at 00:13 +0800, [email protected] wrote: > From: Wen Yang <[email protected]> > > verificationtest-ktap used CWD-relative paths which broke when > invoked outside the verification directory (e.g. via vng).
I still don't get this, I even run from my home directory and it works without this commit: make -C linux/tools/testing/selftests/verification/ run_tests It builds and runs your new tests just fine, how exactly do you run them? vng shouldn't affect this since it runs from the same directory as overlay mount, what errors are you getting? The only issue I see is with the read only filesystems since ftracetest attempts to write logs, but that doesn't seem solved by your commit either. Adding the appropriate rwdir lets me run them just fine: vng -v --rwdir tools/testing/selftests/verification/logs -- make -C tools/testing/selftests/verification run_tests I'm suspecting you're trying to call verificationtest-ktap manually from somewhere else to call it only on tlob/, but that looks like asking for troubles. While you're at it I don't see why you don't just call ftracetest. Gabriele > > 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"
