diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2016-05-01 17:37:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-02 11:28:04 -0700 |
commit | bb05510e55796194540ed4e50a62771489c59a04 (patch) | |
tree | 018189044048e23a73d5915b1e38768e6387692d /t | |
parent | t5510: do not leave changed cwd (diff) | |
download | tgif-bb05510e55796194540ed4e50a62771489c59a04.tar.xz |
t5510: run auto-gc in the foreground
The last test added to 't5510-fetch' in 0898c9628104 (fetch: release
pack files before garbage-collecting, 2016-01-13) may sporadically
trigger following error message from the test harness:
rm: cannot remove 'trash directory.t5510-fetch/auto-gc/.git': Directory not empty
The test in question forces an auto-gc, which, if the system supports
it, runs in the background by default, and occasionally takes long
enough for the test to finish and for 'test_done' to start
housekeeping. This can lead to the test's 'git gc --auto' in the
background and 'test_done's 'rm -rf $trash' in the foreground racing
each other to create and delete files and directories. It might just
happen that 'git gc' re-creates a directory that 'rm -rf' already
visited and removed, which ultimately triggers the above error.
Disable detaching the auto-gc process to ensure that it finishes
before the test can continue, thus avoiding this racy situation.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5510-fetch.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 5b52c877c3..a82348bd52 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -718,6 +718,7 @@ test_expect_success 'fetching with auto-gc does not lock up' ' ( cd auto-gc && git config gc.autoPackLimit 1 && + git config gc.autoDetach false && GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 && ! grep "Should I try again" fetch.out ) |