clone_submodule: avoid using `access()` on directories
[git.git] / t / t0010-racy-git.sh
blob837c8b7228b98e8e7b3dbfecd5046673554ef464
1 #!/bin/sh
3 test_description='racy GIT'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 # This test can give false success if your machine is sufficiently
9 # slow or your trial happened to happen on second boundary.
11 for trial in 0 1 2 3 4
13 rm -f .git/index
14 echo frotz >infocom
15 git update-index --add infocom
16 echo xyzzy >infocom
18 files=$(git diff-files -p)
19 test_expect_success \
20 "Racy GIT trial #$trial part A" \
21 'test "" != "$files"'
23 sleep 1
24 echo xyzzy >cornerstone
25 git update-index --add cornerstone
27 files=$(git diff-files -p)
28 test_expect_success \
29 "Racy GIT trial #$trial part B" \
30 'test "" != "$files"'
32 done
34 test_done