diff options
| author | Mark Brown <broonie@kernel.org> | 2026-04-16 20:03:59 +0100 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2026-04-16 15:17:32 -0600 |
| commit | df410ad40ca0a57c46c06de2b992de8baf3a7f5a (patch) | |
| tree | f481834b4dbce01b832dae6df46b0e46a5d9258a /include/mtd/git@git.tavy.me:linux-stable.git | |
| parent | 93edbf1782afaf907b035010c00e7390c9d45b18 (diff) | |
selftests: Fix runner.sh for non-bash shells
Commit 2964f6b816c2 ("selftests: Use ktap helpers for runner.sh") added a
number of bashisms and updated the interpreter specified for the script to
be /bin/bash to reflect this. Unfortunately this does not actually achieve
anything in production since the main way runner.sh is invoked is from the
top level run_kselftest.sh which sources it rather than running it as a
separate script and specifies the shell as /bin/sh. This means that on
systems where /bin/sh is not bash (such as Debian where /bin/sh defaults to
being dash) we see failures:
./run_kselftest.sh: 195: ./kselftest/runner.sh: Syntax error: "(" unexpected (expecting "}")
These bashisms come from this part of the change:
4. In runner.sh run_one(), get the return value and use ktap helpers for
all pass/fail reporting. This allows counting pass/fail numbers in the
main process.
which uses a bash array to track all the subtests being run. Convert this
to use a simple flat variable instead.
Link: https://lore.kernel.org/r/20260416-selftest-fix-readlink-e-v1-2-94e4cabbdec4@kernel.org
Fixes: 2964f6b816c2 ("selftests: Use ktap helpers for runner.sh")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/mtd/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
