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

Re: [PATCH v1] t0021: fix flaky test

From
Jeff King <peff@peff.net>
Date
Dec 19, 2016, 20:00 UTC
Message-ID
<20161219200034.nkcjfrey5vvakmkf@sigill.intra.peff.net>
In-Reply-To
<6e0ea8b0-181a-2ab6-5bab-4f8dfa1d76fa@ramsayjones.plus.com>
On Mon, Dec 19, 2016 at 05:24:32PM +0000, Ramsay Jones wrote:
Show 12 quoted lines
> > t0021.15 creates files, adds them to the index, and commits them. All
> > this usually happens in a test run within the same second and Git cannot
> > know if the files have been changed between `add` and `commit`.  Thus,
> > Git has to run the clean filter in both operations. Sometimes these
> > invocations spread over two different seconds and Git can infer that the
> > files were not changed between `add` and `commit` based on their
> > modification timestamp. The test would fail as it expects the filter
> > invocation. Remove this expectation to make the test stable.
> [...]
> I applied this to the pu branch and ran the test by hand
> 48 times in a row without failure. (the most trials without
> error beforehand was 24).

The original also fails nearly-instantly under my stress script[1], and it runs for several minutes with this patch.

It might be instructive to try all of the tests under that script, but it would require a fair bit of patience (and to some degree, people running "make -j32 test" accomplishes the same thing over time).

-Peff
[1] https://github.com/peff/git/blob/meta/stress
Previous: Ramsay Jones
Message 6 of 6 in “test failure”
  1. Ramsay JonesDec 16, 2016
  2. Lars SchneiderDec 17, 2016
  3. Lars SchneiderDec 17, 2016
  4. t0021: fix flaky testlarsxschneider@gmail.com, Dec 18, 2016
  5. Ramsay JonesDec 19, 2016
  6. Jeff KingDec 19, 2016

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.