From c2dd3258882427afeaf3e1f7eb59bc13d30441e7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 17 May 2012 11:56:35 +1000 Subject: [PATCH] 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 --- build_test.fns | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.34.1