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

Re: [RFC PATCH 4/5] t1700-split-index: date back files to avoid racy situations

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 6, 2018, 09:20 UTC
Message-ID
<87y3cfq8wa.fsf@evledraar.gmail.com>
In-Reply-To
<20180906091539.GA8805@localhost>
On Thu, Sep 06 2018, SZEDER Gábor wrote:
Show 16 quoted lines
> On Thu, Sep 06, 2018 at 10:02:43AM +0200, Ævar Arnfjörð Bjarmason wrote:
>> 
>> On Thu, Sep 06 2018, SZEDER Gábor wrote:
>> 
>> > +# Create a file named as $1 with content read from stdin.
>> > +# Set the file's mtime to a few seconds in the past to avoid racy situations.
>> > +create_file () {
>> 
>> Nit: Would be easier to read in the future as
>> e.g. s/create_file/create_old_file/ or something like that. I.e. so you
>> can see at a glance from the tests themselves what this is doing.
>
> Perhaps; but then I'm not so sure about 'old', because that's just a
> property of the resulting file...  I'm inclined to rename it to
> 'create_non_racy_file' to also imply "why" this function is used
> instead of plain old '>file'.
Yeah, that's much better.
Previous: SZEDER GáborNext: SZEDER Gábor
Message 11 of 20 in “Fix the racy split index problem”
  1. 0/5 Fix the racy split index problemSZEDER Gábor, Sep 6, 2018
  2. 1/5 t1700-split-index: drop unnecessary 'grep'SZEDER Gábor, Sep 6, 2018
  3. Junio C HamanoSep 6, 2018
  4. Duy NguyenSep 8, 2018
  5. 2/5 t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split indexSZEDER Gábor, Sep 6, 2018
  6. Ævar Arnfjörð BjarmasonSep 6, 2018
  7. 3/5 split index: add a test to demonstrate the racy split index problemSZEDER Gábor, Sep 6, 2018
  8. 4/5 t1700-split-index: date back files to avoid racy situationsSZEDER Gábor, Sep 6, 2018
  9. Ævar Arnfjörð BjarmasonSep 6, 2018
  10. SZEDER GáborSep 6, 2018
  11. Ævar Arnfjörð BjarmasonSep 6, 2018
  12. 5/5 split-index: smudge and add racily clean cache entries to split indexSZEDER Gábor, Sep 6, 2018
  13. Ævar Arnfjörð BjarmasonSep 6, 2018
  14. Ævar Arnfjörð BjarmasonSep 6, 2018
  15. SZEDER GáborSep 6, 2018
  16. Ævar Arnfjörð BjarmasonSep 6, 2018
  17. Ævar Arnfjörð BjarmasonSep 6, 2018
  18. SZEDER GáborSep 7, 2018
  19. Paul-Sebastian UngureanuSep 10, 2018
  20. Duy NguyenSep 8, 2018

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.