apenwarr-redo/t/curse
Avery Pennarun 95680ed7ef Switch to using a separate lockfile per target.
The previous method, using fcntl byterange locks, was very efficient and
avoided unnecessarily filesystem metadata churn (ie. creating/deleting
inodes).  Unfortunately, MacOS X (at least version 10.6.5) apparently has a
race condition in its fcntl locking that makes it unusably unreliable
(http://apenwarr.ca/log/?m=201012#13).

My tests indicate that if you only ever lock a *single* byterange on a file,
the race condition doesn't cause a problem.  So let's just use one lockfile
per target.  Now "redo -j20 test" passes for me on both MacOS and Linux.

This doesn't measurably affect the speed on Linux, at least, in my tests.

The bad news: it's hard to safely *delete* those lockfiles when we're done
with them, so they tend to accumulate in the .redo dir.
2010-12-14 02:44:29 -08:00
..
.gitignore t/curse: test that 'redo' (not redo-ifchange) always redoes a command. 2010-11-19 02:20:17 -08:00
check-1.sh t/curse: add a Makefile so we can compare speed when using GNU make. 2010-11-21 00:31:48 -08:00
check-2.sh Fix tests on MacOS. 2010-12-12 05:38:30 -08:00
clean.do t/curse: add a Makefile so we can compare speed when using GNU make. 2010-11-21 00:31:48 -08:00
countall.do t/curse: test that 'redo' (not redo-ifchange) always redoes a command. 2010-11-19 02:20:17 -08:00
default.n0.do Fix tests on MacOS. 2010-12-12 05:38:30 -08:00
default.n1.do Fix tests on MacOS. 2010-12-12 05:38:30 -08:00
default.n2.do Switch to using a separate lockfile per target. 2010-12-14 02:44:29 -08:00
Makefile Fix tests on MacOS. 2010-12-12 05:38:30 -08:00
seq Fix tests on MacOS. 2010-12-12 05:38:30 -08:00
test.do Fix tests on MacOS. 2010-12-12 05:38:30 -08:00