Re: [PATCH v2 1/5] split-index: add tests to demonstrate the racy split index problem
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 28, 2018, 17:30 UTC
- Message-ID
- <xmqqo9chcyxi.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180928004843.GP27036@localhost>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 25 quoted lines
> Junio, > > On Thu, Sep 27, 2018 at 02:44:30PM +0200, SZEDER Gábor wrote: >> diff --git a/t/t1701-racy-split-index.sh b/t/t1701-racy-split-index.sh >> new file mode 100755 >> index 0000000000..ebde418d7e >> --- /dev/null >> +++ b/t/t1701-racy-split-index.sh >> @@ -0,0 +1,218 @@ >> +#!/bin/sh >> + >> +# This test can give false success if your machine is sufficiently >> +# slow or all trials happened to happen on second boundaries. >> + >> +test_description='racy split index' >> + >> +. ./test-lib.sh >> + >> +test_expect_success 'setup' ' >> + # Only split the index when the test explicitly says so. >> + sane_unset GIT_TEST_SPLIT_INDEX GIT_FSMONITOR_TEST && > > Please note that this patch adds another use of the environment > variable GIT_FSMONITOR_TEST, while the topic 'bp/rename-test-env-var' > is about to rename that variable to GIT_TEST_FSMONITOR.
I think the most sensible thing to do during transition is to set (or unset) both consistently (and leave a note in t/test-lib.sh near check_var_migration that t1701 has done so and the dup should be corrected when transition is over---but that is optional).