diff mbox

[v3,0/6] Fix the racy split index problem

Message ID 20180928162459.17138-1-szeder.dev@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

SZEDER Gábor Sept. 28, 2018, 4:24 p.m. UTC
Third round of fixing occasional test failures when run with
'GIT_TEST_SPLIT_INDEX=yes', with only two rather minor changes since the
previous version; just look at the trivial interdiff below.

SZEDER Gábor (6):
  t1700-split-index: document why FSMONITOR is disabled in this test
    script
  split-index: add tests to demonstrate the racy split index problem
  t1700-split-index: date back files to avoid racy situations
  split-index: count the number of deleted entries
  split-index: don't compare stat data of entries already marked for
    split index
  split-index: smudge and add racily clean cache entries to split index

 cache.h                     |   2 +
 read-cache.c                |   2 +-
 split-index.c               | 121 +++++++++++++++++---
 t/t1700-split-index.sh      |  52 +++++----
 t/t1701-racy-split-index.sh | 214 ++++++++++++++++++++++++++++++++++++
 5 files changed, 351 insertions(+), 40 deletions(-)
 create mode 100755 t/t1701-racy-split-index.sh

Interdiff:

Comments

SZEDER Gábor Sept. 30, 2018, 2:47 p.m. UTC | #1
Junio,


On Fri, Sep 28, 2018 at 06:24:53PM +0200, SZEDER Gábor wrote:
> Interdiff:
> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
> index c8acbc50d0..f053bf83eb 100755
> --- a/t/t1700-split-index.sh
> +++ b/t/t1700-split-index.sh
> @@ -6,6 +6,9 @@ test_description='split index mode tests'
>  
>  # We need total control of index splitting here
>  sane_unset GIT_TEST_SPLIT_INDEX

The conflict resolution around here in 3f725b07d3 (Merge branch
'sg/split-index-racefix' into jch, 2018-09-29) accidentally removed
the above line, which makes the test fail when run with
'GIT_TEST_SPLIT_INDEX=yes', e.g.:

  https://travis-ci.org/git/git/jobs/435077629#L3389

> +# A couple of tests expect the index to have a specific checksum,
> +# but the presence of the optional FSMN extension would interfere
> +# with those checks, so disable it in this test script.
>  sane_unset GIT_FSMONITOR_TEST
>  
>  # Create a file named as $1 with content read from stdin.
Junio C Hamano Oct. 5, 2018, 6:15 a.m. UTC | #2
SZEDER Gábor <szeder.dev@gmail.com> writes:

> On Fri, Sep 28, 2018 at 06:24:53PM +0200, SZEDER Gábor wrote:
>> Interdiff:
>> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
>> index c8acbc50d0..f053bf83eb 100755
>> --- a/t/t1700-split-index.sh
>> +++ b/t/t1700-split-index.sh
>> @@ -6,6 +6,9 @@ test_description='split index mode tests'
>>  
>>  # We need total control of index splitting here
>>  sane_unset GIT_TEST_SPLIT_INDEX
>
> The conflict resolution around here in 3f725b07d3 (Merge branch
> 'sg/split-index-racefix' into jch, 2018-09-29) accidentally removed
> the above line, ...

Yeah, I see it in "git show --cc".  Will fix the rerere database
entry to prevent the mismerge from recurring..

Sorry, and thanks for helping me correcting the mismerge.
diff mbox

Patch

diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index c8acbc50d0..f053bf83eb 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -6,6 +6,9 @@  test_description='split index mode tests'
 
 # We need total control of index splitting here
 sane_unset GIT_TEST_SPLIT_INDEX
+# A couple of tests expect the index to have a specific checksum,
+# but the presence of the optional FSMN extension would interfere
+# with those checks, so disable it in this test script.
 sane_unset GIT_FSMONITOR_TEST
 
 # Create a file named as $1 with content read from stdin.
diff --git a/t/t1701-racy-split-index.sh b/t/t1701-racy-split-index.sh
index 7f16f5f7a3..5dc221ef38 100755
--- a/t/t1701-racy-split-index.sh
+++ b/t/t1701-racy-split-index.sh
@@ -9,7 +9,7 @@  test_description='racy split index'
 
 test_expect_success 'setup' '
 	# Only split the index when the test explicitly says so.
-	sane_unset GIT_TEST_SPLIT_INDEX GIT_FSMONITOR_TEST &&
+	sane_unset GIT_TEST_SPLIT_INDEX &&
 	git config splitIndex.maxPercentChange 100 &&
 
 	echo "cached content" >racy-file &&