1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-20 13:29:07 +02:00

t4011: "sleep 1" is not enough on FAT

This test depended on "sleep 1" to be enough to dirty the index
entry for a symlink.  Alex noticed that on his Cygwin installation
"sleep 1" was sometimes not enough, and after further discussion with
Christopher Faylor, it was brought up that on FAT filesystem timestamp
granularity is 2 seconds so sleeping 1 second is not enough.

For now this patch takes an easy workaround of sleeping for 3 seconds.

Very strictly speaking, POSIX requires lstat to fill only S_IFMT part
of st_mode and st_size for symlinks, and depending on timestamp might
be considered a bug, but we depend on that anyway, so it is better to
test that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-01-20 13:17:59 -08:00
parent 63be37b06f
commit 5df9140c92

View File

@ -58,7 +58,7 @@ EOF
test_expect_success \
'diff identical, but newly created symlink' \
'sleep 1 &&
'sleep 3 &&
ln -s xyzzy frotz &&
git-diff-index -M -p $tree > current &&
compare_diff_patch current expected'