git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RESEND] t/perf: do not run tests in user's $SHELL

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 20, 2021, 11:56 UTC
Message-ID
<211220.86bl1bwkp9.gmgdl@evledraar.gmail.com>
In-Reply-To
<f22f978a-26eb-8fe9-cab4-3fd60df69635@web.de>
On Mon, Dec 20 2021, René Scharfe wrote:
Show 14 quoted lines
> 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/
This LGTM & I think it could be picked up as-is.
Just a nit in case af a re-roll. I think it would help to summarize the
history a bit per
https://lore.kernel.org/git/YV+1%2F0b5bN3o6qRG@coredump.intra.peff.net/. I.e. something
like:
    
    In 342e9ef2d9e (Introduce a performance testing framework, 2012-02-17)
    when t/perf was introduced the TEST_SHELL_PATH was not part of
    GIT-BUILD-OPTIONS. That was added later in 3f824e91c84 (t/Makefile:
    introduce TEST_SHELL_PATH, 2017-12-08). We will always have that
    available in perf-lib.sh since test-lib.sh will load it before this code
    is executed.
Show 16 quoted lines
>  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_ $*"
Previous: René ScharfeNext: Johannes Altmanninger
Message 2 of 6 in “t/perf: do not run tests in user's $SHELL”
  1. t/perf: do not run tests in user's $SHELLRené Scharfe, Dec 20, 2021
  2. Ævar Arnfjörð BjarmasonDec 20, 2021
  3. Johannes AltmanningerDec 20, 2021
  4. Junio C HamanoDec 20, 2021
  5. Johannes AltmanningerDec 25, 2021
  6. t/perf: do not run tests in user's $SHELLJohannes Altmanninger, Dec 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.