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