From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Duy Nguyen" <pclouds@gmail.com>,
"Thomas Gummerer" <t.gummerer@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCH 2/5] t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
Date: Thu, 6 Sep 2018 04:48:07 +0200 [thread overview]
Message-ID: <20180906024810.8074-3-szeder.dev@gmail.com> (raw)
In-Reply-To: <20180906024810.8074-1-szeder.dev@gmail.com>
The test 'switching trees does not invalidate shared index' in
't0090-cache-tree.sh' is about verifying the behaviour of the split
index feature, therefore it should be in full control of when index
splitting is performed, like all the tests in 't1700-split-index.sh'.
Unset GIT_TEST_SPLIT_INDEX for this test to avoid unintended random
index splitting.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
t/t0090-cache-tree.sh | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 7de40141ca..65b5152b9b 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -242,14 +242,18 @@ test_expect_success 'no phantom error when switching trees' '
test_must_be_empty errors
'
+
test_expect_success 'switching trees does not invalidate shared index' '
- git update-index --split-index &&
- >split &&
- git add split &&
- test-tool dump-split-index .git/index | grep -v ^own >before &&
- git commit -m "as-is" &&
- test-tool dump-split-index .git/index | grep -v ^own >after &&
- test_cmp before after
+ (
+ sane_unset GIT_TEST_SPLIT_INDEX &&
+ git update-index --split-index &&
+ >split &&
+ git add split &&
+ test-tool dump-split-index .git/index | grep -v ^own >before &&
+ git commit -m "as-is" &&
+ test-tool dump-split-index .git/index | grep -v ^own >after &&
+ test_cmp before after
+ )
'
test_done
--
2.19.0.rc0.188.g56c5ee2db1
next prev parent reply other threads:[~2018-09-06 2:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 2:48 [RFC PATCH 0/5] Fix the racy split index problem SZEDER Gábor
2018-09-06 2:48 ` [PATCH 1/5] t1700-split-index: drop unnecessary 'grep' SZEDER Gábor
2018-09-06 21:24 ` Junio C Hamano
2018-09-08 13:50 ` Duy Nguyen
2018-09-06 2:48 ` SZEDER Gábor [this message]
2018-09-06 8:03 ` [PATCH 2/5] t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index Ævar Arnfjörð Bjarmason
2018-09-06 2:48 ` [RFC PATCH 3/5] split index: add a test to demonstrate the racy split index problem SZEDER Gábor
2018-09-06 2:48 ` [RFC PATCH 4/5] t1700-split-index: date back files to avoid racy situations SZEDER Gábor
2018-09-06 8:02 ` Ævar Arnfjörð Bjarmason
2018-09-06 9:15 ` SZEDER Gábor
2018-09-06 9:20 ` Ævar Arnfjörð Bjarmason
2018-09-06 2:48 ` [RFC PATCH 5/5] split-index: smudge and add racily clean cache entries to split index SZEDER Gábor
2018-09-06 10:26 ` Ævar Arnfjörð Bjarmason
2018-09-06 12:26 ` Ævar Arnfjörð Bjarmason
2018-09-06 15:14 ` SZEDER Gábor
2018-09-06 15:26 ` Ævar Arnfjörð Bjarmason
2018-09-06 17:53 ` Ævar Arnfjörð Bjarmason
2018-09-07 3:49 ` SZEDER Gábor
2018-09-10 22:12 ` Paul-Sebastian Ungureanu
2018-09-08 16:45 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180906024810.8074-3-szeder.dev@gmail.com \
--to=szeder.dev@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=t.gummerer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.