Web lists-archives.com

Re: Git Test Coverage Report (v2.20.0-rc0)

On 11/19/2018 10:40 AM, Derrick Stolee wrote:
The test coverage reports started mid-way through this release cycle, so I thought it would be good to do a full review of the new uncovered code since the last release.

I eliminated most of the uncovered code due to the following cases:

1. Code was only moved or refactored.
2. Code was related to unusual error conditions (e.g. open_pack_index() fails)

The comments below are intended only to point out potential directions to improve test coverage. Some of it is for me to do!


On 11/18/2018 9:54 PM, Derrick Stolee wrote:

There are a lot of lines introduced by the IEOT extension in these commits:

> Ben Peart      3255089ad: ieot: add Index Entry Offset Table (IEOT) extension
 > Ben Peart      3b1d9e045: eoie: add End of Index Entry (EOIE) extension
> Ben Peart      77ff1127a: read-cache: load cache entries on worker threads > Ben Peart      abb4bb838: read-cache: load cache extensions on a worker thread
 > Ben Peart      c780b9cfe: config: add new index.threads config setting
> Ben Peart      d1664e73a: add: speed up cmd_add() by utilizing read_cache_preload() > Ben Peart      fa655d841: checkout: optimize "git checkout -b <new_branch>"

These should be hit if you run the test suite with GIT_TEST_INDEX_THREADS=2. Without that, the indexes for the various tests are too small to trigger multi-threaded index reads/writes.

From t/README:

GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading
of the index for the whole test suite by bypassing the default number of
cache entries and thread minimums. Setting this to 1 will make the
index loading single threaded.