]>
Commit | Line | Data |
---|---|---|
29e4d363 JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='racy GIT' | |
4 | ||
c150064d | 5 | TEST_PASSES_SANITIZE_LEAK=true |
29e4d363 JH |
6 | . ./test-lib.sh |
7 | ||
8 | # This test can give false success if your machine is sufficiently | |
9 | # slow or your trial happened to happen on second boundary. | |
10 | ||
407c8eb0 | 11 | for trial in 0 1 2 3 4 |
29e4d363 | 12 | do |
16050352 AG |
13 | test_expect_success "Racy git trial #$trial part A" ' |
14 | rm -f .git/index && | |
15 | echo frotz >infocom && | |
16 | git update-index --add infocom && | |
17 | echo xyzzy >infocom && | |
18 | ||
19 | git diff-files -p >out && | |
20 | test_file_not_empty out | |
21 | ' | |
407c8eb0 | 22 | sleep 1 |
407c8eb0 | 23 | |
16050352 AG |
24 | test_expect_success "Racy git trial #$trial part B" ' |
25 | echo xyzzy >cornerstone && | |
26 | git update-index --add cornerstone && | |
407c8eb0 | 27 | |
16050352 AG |
28 | git diff-files -p >out && |
29 | test_file_not_empty out | |
30 | ' | |
29e4d363 JH |
31 | done |
32 | ||
33 | test_done |