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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks,

-Stolee





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux