test that build farm locks are > 0 size
[build-farm.git] / build_test.fns
index 392180a6280a1971b3c33b833241d0ec0b9debbc..2358524ad9d35a3f991b852a1705d950fd886d57 100644 (file)
@@ -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