Added a check for disk space..
authorMohamed Barwani <mohamedb@sgi.com>
Thu, 1 Nov 2007 03:11:35 +0000 (03:11 +0000)
committerMohamed Barwani <mohamedb@sgi.com>
Thu, 1 Nov 2007 03:11:35 +0000 (03:11 +0000)
Merge of master-melb:xfs-cmds:29995a by kenmcd.

  Check if there is enough disk space to run this test..

180

diff --git a/180 b/180
index 13ed6fd720ca5f5a5e3af7cadf911409483b2d5e..5d4247e376ce3f73f524efd315529f21b80034a8 100644 (file)
--- a/180
+++ b/180
@@ -37,6 +37,11 @@ _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1
 _scratch_mount
 
+# Do we have enough space on disk?
+FREE_BLOCKS=`df -kl $SCRATCH_MNT | grep -v Filesystem | awk '{print $4}'`
+[ $FREE_BLOCKS -lt 10485760 ] && _notrun "This test requires at least 10GB of \
+                                          $SCRATCH_DEV to run"
+
 _check_files()
 {
        # check file size and contents