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

Re: Git Test Coverage Report (Tuesday, Sept 25)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 27, 2018, 15:38 UTC
Message-ID
<87wor7hrwt.fsf@evledraar.gmail.com>
In-Reply-To
<07ab14bb-766b-e375-989b-73974ef7fece@gmail.com>
On Thu, Sep 27 2018, Derrick Stolee wrote:
Show 36 quoted lines
> On 9/27/2018 11:21 AM, Ben Peart wrote:
>>
>>
>> On 9/26/2018 2:54 PM, Derrick Stolee wrote:
>>>
>>> GIT_TEST_INDEX_THREADS=1
>>>
>>
>> Because the test repos are so small (ie smaller than 10K files), the
>> test suite already executes as if GIT_TEST_INDEX_THREADS=1 is set
>> (ie single threaded). I added the test variable so that the
>> multi-threading code could be forced to execute in spite of the
>> default minimum number of files logic.
>>
>> I'd recommend you set GIT_TEST_INDEX_THREADS=3 instead. (3 because 1
>> thread is used for loading the index extensions and we need 2 or
>> more threads available to exercise multi-threaded loading of the
>> index entries).
>
> According to t/README, GIT_TEST_INDEX_THREADS is a boolean and setting
> it to 1 causes us to use 3 threads:
>
>  GIT_TEST_INDEX_THREADS=<boolean> forces multi-threaded loading of
>  the index cache entries and extensions for the whole test suite.
>
> Here is the only consumption of the variable in the product code (in
> read-cache.c):
>
>  /* enable testing with fewer than default minimum of entries */
>  if (istate->cache_nr > 1 && nr_threads < 3 &&
> git_env_bool("GIT_TEST_INDEX_THREADS", 0))
>  nr_threads = 3;
>
> This was non-obvious to me, and I had originally set it to a larger
> number. I happened to notice the boolean nature while I was looking up
> the rest of the GIT_TEST_* variables.

I didn't know it worked like that. Would be neat if we had some "strict bool" function in config.c that would accept on/true/1 off/false/0 but barf on e.g. 12345 instead of treating it as just another synonym for 1, I'd say we could even enable it by default, but maybe not, but definitely for all this GIT_TEST_* stuff.

Previous: Derrick StoleeNext: Junio C Hamano
Message 10 of 15 in “Git Test Coverage Report (Tuesday, Sept 25)”
  1. Derrick StoleeSep 25, 2018
  2. Ben PeartSep 25, 2018
  3. Derrick StoleeSep 26, 2018
  4. Jason PyeronSep 26, 2018
  5. Derrick StoleeSep 26, 2018
  6. Thomas GummererSep 26, 2018
  7. Derrick StoleeSep 26, 2018
  8. Ben PeartSep 27, 2018
  9. Derrick StoleeSep 27, 2018
  10. Ævar Arnfjörð BjarmasonSep 27, 2018
  11. Junio C HamanoSep 26, 2018
  12. Derrick StoleeSep 26, 2018
  13. Ben PeartSep 27, 2018
  14. Derrick StoleeSep 27, 2018
  15. Elijah NewrenSep 26, 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.