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

Re: [PATCH] t1092: use GIT_PROGRESS_DELAY for consistent results

From
Derrick Stolee <stolee@gmail.com>
Date
May 24, 2021, 20:38 UTC
Message-ID
<e35b5217-362f-fc4f-7396-08218a9abf63@gmail.com>
In-Reply-To
<YKwMU13DOtTIgaeP@google.com>
On 5/24/21 4:28 PM, Jonathan Nieder wrote:
Show 17 quoted lines
> Hi,
> 
> Derrick Stolee wrote:
> 
>> The t1092-sparse-checkout-compatibility.sh tests compare the stdout and
>> stderr for several Git commands across both full checkouts, sparse
>> checkouts with a full index, and sparse checkouts with a sparse index.
>> Since these are direct comparisons, sometimes a progress indicator can
>> flush at unpredictable points, especially on slower machines. This
>> causes the tests to be flaky.
> 
> Hm, I think this test strategy is going to be fundamentally flaky
> regardless: Git doesn't intend to guarantee any kind of stability in
> the exact stderr output it writes.
> 
> Could the tests be made to check more semantically meaningful
> information such as "git ls-files -s" output instead?

The test is comparing the same exact Git command just with different configurations. Any change to what Git writes to stderr should be consistent across these, unless there is an explicit reason why it would behave differently across these options (for example, saying "You are in a sparse checkout" in 'git status').

There are no expectations that stderr is stable across versions of Git. These tests don't add friction to developers making new features or changing the error messages that appear over stderr. It's just that these tests should catch any unintended inconsistency across these modes.

Thanks, -Stolee

Previous: Jonathan NiederNext: Taylor Blau
Message 3 of 18 in “t1092: use GIT_PROGRESS_DELAY for consistent results”
  1. t1092: use GIT_PROGRESS_DELAY for consistent resultsDerrick Stolee via GitGitGadget, May 24, 2021
  2. Jonathan NiederMay 24, 2021
  3. Derrick StoleeMay 24, 2021
  4. Taylor BlauMay 24, 2021
  5. Ævar Arnfjörð BjarmasonMay 24, 2021
  6. Taylor BlauMay 25, 2021
  7. Derrick StoleeMay 25, 2021
  8. Junio C HamanoMay 25, 2021
  9. Derrick StoleeMay 25, 2021
  10. Junio C HamanoMay 25, 2021
  11. Junio C HamanoMay 25, 2021
  12. Taylor BlauMay 25, 2021
  13. Junio C HamanoMay 25, 2021
  14. Taylor BlauMay 25, 2021
  15. Ævar Arnfjörð BjarmasonMay 25, 2021
  16. Junio C HamanoMay 25, 2021
  17. Junio C HamanoMay 25, 2021
  18. Junio C HamanoMay 25, 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.