tests: disable fsync everywhere
commit412e4caee387d825903bf1252aefbd5cf995a599
authorEric Wong <e@80x24.org>
Fri, 29 Oct 2021 00:15:52 +0000 (29 00:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Oct 2021 17:22:40 +0000 (29 10:22 -0700)
tree3a2104c1ac2fd9c9630d2ab02ea1dfc7ea8cadc8
parentaf6d1d602a8f64164b266364339c4e936d5bbc33
tests: disable fsync everywhere

The "GIT_TEST_FSYNC" environment variable now exists for
disabling fsync() even on packfiles and other "critical" data.

Running "make test -j8 NO_SVN_TESTS=1" on a noisy 8-core system
on an HDD, test runtime drops from ~4 minutes down to ~3 minutes.
Using "GIT_TEST_FSYNC=1" re-enables fsync() for comparison
purposes.

SVN interopability tests are minimally affected since SVN will
still use fsync in various places.

This will also be useful for 3rd-party tools which create
throwaway git repositories of temporary data, but remains
undocumented for end users.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
environment.c
git-cvsserver.perl
perl/Git/SVN.pm
t/test-lib.sh
write-or-die.c