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

Re: [PATCH] t4205: don't exit test script on failure

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 1, 2022, 23:05 UTC
Message-ID
<221202.86edtihgga.gmgdl@evledraar.gmail.com>
In-Reply-To
<c5b4d091-23c1-5a75-a255-99ec83973d8d@web.de>
On Thu, Dec 01 2022, René Scharfe wrote:
Show 31 quoted lines
> Only abort the individual check instead of exiting the whole test script
> if git show fails.  Noticed with GIT_TEST_PASSING_SANITIZE_LEAK=check.
>
> Helped-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
> Formatted with --function-context for easier review.
> ac52d9410e (t4205: cover `git log --reflog -z` blindspot,
> 2019-11-19) added the exit call.
>
>  t/t4205-log-pretty-formats.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
> index e448ef2928..0404491d6e 100755
> --- a/t/t4205-log-pretty-formats.sh
> +++ b/t/t4205-log-pretty-formats.sh
> @@ -154,12 +154,12 @@ done
>  test_expect_success 'NUL termination with --reflog --pretty=oneline' '
>  	revs="$(git rev-list --reflog)" &&
>  	for r in $revs
>  	do
>  		git show -s --pretty=oneline "$r" >raw &&
> -		cat raw | lf_to_nul || exit 1
> +		cat raw | lf_to_nul || return 1
>  	done >expect &&
>  	# the trailing NUL is already produced so we do not need to
>  	# output another one
>  	git log -z --pretty=oneline --reflog >actual &&
>  	test_cmp expect actual
>  '

This is also 6/6 in this series to submit a bunch of these sorts of issues, which I submitted back in July: https://lore.kernel.org/git/cover-0.6-00000000000-20220721T064349Z-avarab@gmail.com/

Previous: René ScharfeNext: Junio C Hamano
Message 2 of 6 in “t4205: don't exit test script on failure”
  1. t4205: don't exit test script on failureRené Scharfe, Dec 1, 2022
  2. Ævar Arnfjörð BjarmasonDec 1, 2022
  3. Junio C HamanoDec 1, 2022
  4. Ævar Arnfjörð BjarmasonDec 2, 2022
  5. Junio C HamanoDec 2, 2022
  6. Junio C HamanoDec 3, 2022

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.