[PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this, 273 was failing in cryptic ways for me
if the device size was < 2G.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/common.rc b/common.rc
index bf9c86f..8906067 100644
--- a/common.rc
+++ b/common.rc
@@ -348,6 +348,11 @@ _scratch_mkfs_sized()
     [ -z "$blocksize" ] && blocksize=4096
     blocks=`expr $fssize / $blocksize`
 
+    if [ "$HOSTOS" == "Linux" ]; then
+	devsize=`blockdev --getsize64 $SCRATCH_DEV`
+	[ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small"
+    fi
+
     case $FSTYP in
     xfs)
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux