[PATCH RESEND] t/perf: do not run tests in user's $SHELL
- From
René Scharfe <l.s.r@web.de>
- Date
- Dec 20, 2021, 11:05 UTC
- Message-ID
- <f22f978a-26eb-8fe9-cab4-3fd60df69635@web.de>
From: Johannes Altmanninger <aclopte@gmail.com>
The environment variable $SHELL is usually set to the user's interactive shell. We never use that shell for build and test scripts because it might not be a POSIX shell.
Perf tests are run inside $SHELL via a wrapper defined in t/perf/perf-lib.sh. Use $TEST_SHELL_PATH like elsewhere.
Signed-off-by: Johannes Altmanninger <aclopte@gmail.com> Acked-by: Jeff King <peff@peff.net> --- Original submission: https://lore.kernel.org/git/20211007184716.1187677-1-aclopte@gmail.com/
t/perf/perf-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 780a7402d5..407252bac7 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -161,7 +161,7 @@ test_run_perf_ () { test_cleanup=: test_export_="test_cleanup" export test_cleanup test_export_ - "$GTIME" -f "%E %U %S" -o test_time.$i "$SHELL" -c ' + "$GTIME" -f "%E %U %S" -o test_time.$i "$TEST_SHELL_PATH" -c ' . '"$TEST_DIRECTORY"/test-lib-functions.sh' test_export () { test_export_="$test_export_ $*" -- 2.34.0