Skip to contentSkip to conversation

xfstests: _fail in _scratch_mkfs_sized if device is too small

PATCH In review Eric Sandeen 2 participants 2 messages Nov 29, 2012 – Nov 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: _fail in _scratch_mkfs_sized if device is too small

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

---

common.rc +5 -0
index bf9c86f..8906067 100644
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs