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

Re: [PATCH v2 0/3] t7004: cleanup and modernize brittle tests

From
Patrick Steinhardt <ps@pks.im>
Date
Apr 21, 2026, 05:38 UTC
Message-ID
<aecNc-BNwaqFlg5c@pks.im>
In-Reply-To
<20260421053334.5414-1-r.siddharth.shrimali@gmail.com>
On Tue, Apr 21, 2026 at 11:03:31AM +0530, Siddharth Shrimali wrote:
Show 16 quoted lines
> This patch series addresses brittle testing patterns in t7004-tag.sh. 
> 
> In this second version, the first patch has been updated to follow 
> Junio's "belt-and-suspenders" suggestion. Instead of simply removing
> the tag count check, it now uses 'test_cmp' to verify that the repository
> state remains unchanged after failed tag creation attempts. This
> maintains verification while removing the reliance on a hardcoded
> global tag count.
> 
> Subsequent patches continue to modernize the script by removing 
> hardcoded global state and replacing subshell patterns that could 
> otherwise suppress Git exit codes, ensuring that crashes (like 
> segmentation faults) are properly detected.
> 
> Thanks to Patrick and Junio for the feedback on v1 regarding
> state verification.
Thanks, this version looks good to me!
Patrick
Previous: Siddharth Shrimali
Message 12 of 12 in “t7004: cleanup and modernize brittle tests”
  1. 0/3 t7004: cleanup and modernize brittle testsSiddharth Shrimali, Apr 14, 2026
  2. 1/3 t7004: drop hardcoded tag count in invalid name testSiddharth Shrimali, Apr 14, 2026
  3. Junio C HamanoApr 14, 2026
  4. Patrick SteinhardtApr 20, 2026
  5. 2/3 t7004: dynamically grab expected state in testsSiddharth Shrimali, Apr 14, 2026
  6. Junio C HamanoApr 14, 2026
  7. 3/3 t7004: avoid subshells to capture git exit codesSiddharth Shrimali, Apr 14, 2026
  8. 0/3 t7004: cleanup and modernize brittle testsSiddharth Shrimali, Apr 21, 2026
  9. 1/3 t7004: drop hardcoded tag count for state verificationSiddharth Shrimali, Apr 21, 2026
  10. 2/3 t7004: dynamically grab expected state in testsSiddharth Shrimali, Apr 21, 2026
  11. 3/3 t7004: avoid subshells to capture git exit codesSiddharth Shrimali, Apr 21, 2026
  12. Patrick SteinhardtApr 21, 2026

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.