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

Re: [GSOC][PATCH v2] t6422: avoid suppressing Git’s exit code in tests

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2025, 20:47 UTC
Message-ID
<xmqqh658m840.fsf@gitster.g>
In-Reply-To
<20250205142817.42117-1-ayu.chandekar@gmail.com>
Ayush Chandekar <ayu.chandekar@gmail.com> writes:

Thanks for practicing yet another iteration. I am not going to actually replace the previous one with this one, as the previous one is just OK, but let's pretend I would to complete the "simulated" iteration.

Below, pretend that we will discard the previous one and replace it with this one, and plan to merge the result to 'next', but that is only for practice.

---
> Subject: Re: [GSOC][PATCH v2] t6422: avoid suppressing Git’s exit code in tests
This is about 6423 ;-)  I'll amend while applying the patch.
Show 13 quoted lines
> Some test in t6423 supress Git's exit code, which can cause test
> failures go unnoticed. Specifically using git <subcommand> |
> <other-command> masks potential failures of the Git command.
>
> Instead of executing a Git command as the upstream component of
> a pipe, which can result in the exit status being lost, redirect
> its output to a file and then process that file in two steps to
> ensure the exit status is properly preserved.
>
> Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
> ---
>  t/t6423-merge-rename-directories.sh | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

OK. And the change to the test body to lose input redirection into "uniq" look OK, too.

Thanks.  Let's replace it and mark the topic for 'next'.
Previous: Ayush ChandekarNext: Ayush Chandekar
Message 8 of 9 in “t6423: fix suppression of Git���s exit code in tests”
  1. t6423: fix suppression of Git���s exit code in testsayu-ch, Feb 2, 2025
  2. Meet SoniFeb 2, 2025
  3. Eric SunshineFeb 2, 2025
  4. Junio C HamanoFeb 3, 2025
  5. Ayush ChandekarFeb 4, 2025
  6. Junio C HamanoFeb 4, 2025
  7. [GSOC][PATCH v2] t6422: avoid suppressing Git’s exit code in testsAyush Chandekar, Feb 5, 2025
  8. Junio C HamanoFeb 5, 2025
  9. Ayush ChandekarFeb 6, 2025

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.