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

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

From
Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
Date
Apr 14, 2026, 14:18 UTC
Message-ID
<20260414141828.27576-1-r.siddharth.shrimali@gmail.com>
This patch series addresses some brittle testing patterns in t7004-tag.sh

The first patch follows a suggestion by Junio to remove redundant tag counting in the invalid name test. The second and third patches extend this cleanup to hardcoded global state and modernizing subshell patterns that could otherwise suppress git exit codes.

--- This series is a follow-up to my previous patch "t7004: replace wc -l with modern test helpers". Thanks to Junio for the feedback on the last patch. I have applied those changes here and have gone through the rest of the file and fixed similar issues.

Siddharth Shrimali (3):
  t7004: drop hardcoded tag count in invalid name test
  t7004: dynamically grab expected state in tests
  t7004: avoid subshells to capture git exit codes
 t/t7004-tag.sh | 43 +++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 22 deletions(-)
-- 
2.51.2
Next: Siddharth Shrimali
Message 1 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.