From: Andrew Bartlett Date: Thu, 17 May 2012 01:56:35 +0000 (+1000) Subject: test that build farm locks are > 0 size X-Git-Url: http://git.samba.org/?p=build-farm.git;a=commitdiff_plain;h=c2dd3258882427afeaf3e1f7eb59bc13d30441e7 test that build farm locks are > 0 size This does make the locks less atomic, but disk full situations are more common. When the disk fills up, then the zero length file is created, and the host drops out of the build farm. Andrew Bartlett --- diff --git a/build_test.fns b/build_test.fns index 392180a6..2358524a 100644 --- a/build_test.fns +++ b/build_test.fns @@ -196,7 +196,9 @@ lock_file() { return 0 fi - if test -f "$lckf"; then + # We need to assert that the file is > 0 size, as otherwise we never + # recover from disk full situations + if test -f "$lckf" && test -s "$lckf"; then test x$machine = x$host || { echo "lock file $lckf is valid for other machine $machine" return 1