Re: [PATCH v4 02/10] t7422: fix flaky test caused by buffered stdout
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jan 24, 2025, 09:16 UTC
- Message-ID
- <CAP8UFD1NX4C2jpbcb=CtX6w5qj3tZPchQ+bdHCX4x9fFqyBrBQ@mail.gmail.com>
- In-Reply-To
- <20250110-b4-pks-ci-fixes-v4-2-6e4613446080@pks.im>
On Fri, Jan 10, 2025 at 12:32 PM Patrick Steinhardt <ps@pks.im> wrote:
> Fix the issue by generating a couple thousand nested submodules and > matching on the first nested submodule. This ensures that the recursive > git-submodule(1) process completely fills its stdout buffer,
The patch looks great to me and I like the previous discussion with Peff about it. I just want to say that, after reading the discussion and then this paragraph, I wondered if it would have been possible to instead have a `test-tool submodule` helper that would behave the same as `git submodule` except that it would call setvbuf() to reduce the size of the stdout buffer. This might have allowed a test that didn't need 2000 nested submodules, and thus might have been faster. No need to change anything though.
> which makes > subsequent writes block until the downstream consumer of the pipe either > reads more or closes it.