> hm, why? Is that a thing people actually do? > > Is anyone going to actually test this feature?
Yes — invoking selftests directly from the kernel root can easily happen in practice, for example:: sudo tools/testing/selftests/mm/run_vmtests.sh This currently results in false failures because relative paths being resolved against the caller's cwd instead of the script directory. > > Alternatively we could check that we're in the correct directory and > error out if not. That would also be reasonable, but I slightly prefer auto-cd because it avoids an easy invocation pitfall and makes the runner more robust for wrappers/CI where the cwd is not stable. That said, I'm happy to switch to a fail-fast cwd check if you prefer the behavior. Regards, Sun

