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

Re: Is t7006-pager.sh racy?

From
Jeff King <peff@peff.net>
Date
Nov 21, 2021, 22:05 UTC
Message-ID
<YZrCmPb5AIW8YYQ0@coredump.intra.peff.net>
In-Reply-To
<YZqSgu4XjPWnURju@coredump.intra.peff.net>
On Sun, Nov 21, 2021 at 01:40:02PM -0500, Jeff King wrote:
Show 7 quoted lines
> It seems like this thread stalled. Ævar, were you planning to fix these
> tests?
> 
> It's not too hard to swap out a "yes" as I showed above, but it further
> confuses the trace2 output, because now we have the child yes (or its
> shell equivalent) exiting as well.
> [...]

I think it also probably doesn't test what the patch adding these tests was interested in. Specifically, it's trying to check the case of reporting the pager exit code while we're in a signal handler. So we have to get the SIGPIPE in the main git process to trigger that. Which means it has to be a builtin.

So you really do need a builtin that produces infinite output. Or at the very least, enough that we expect it to fill any possible OS pipe buffer. I guess the latter is actually not that hard. A 1MB commit-message would be plenty (or if you prefer, a big file with "log -p").

-Peff
Previous: Jeff KingNext: Jeff King
Message 7 of 17 in “Is t7006-pager.sh racy?”
  1. Junio C HamanoOct 24, 2021
  2. SZEDER GáborOct 24, 2021
  3. Jeff KingOct 25, 2021
  4. SZEDER GáborOct 28, 2021
  5. Jeff KingOct 28, 2021
  6. Jeff KingNov 21, 2021
  7. Jeff KingNov 21, 2021
  8. t7006: clean up SIGPIPE handling in trace2 testsJeff King, Nov 21, 2021
  9. Jeff KingNov 21, 2021
  10. Junio C HamanoNov 22, 2021
  11. Jeff KingNov 22, 2021
  12. Jeff KingNov 22, 2021
  13. Junio C HamanoNov 22, 2021
  14. Junio C HamanoNov 22, 2021
  15. Jeff KingNov 22, 2021
  16. run-command: unify signal and regular logic for wait_or_whine()Jeff King, Nov 22, 2021
  17. Ævar Arnfjörð BjarmasonDec 1, 2021

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.