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

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

From
René Scharfe <l.s.r@web.de>
Date
Dec 1, 2022, 21:48 UTC
Message-ID
<c5b4d091-23c1-5a75-a255-99ec83973d8d@web.de>

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
 '
--
2.30.2
Next: Ævar Arnfjörð Bjarmason
Message 1 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.