]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfsqa: fix size specification for scratch mkfs
authorDave Chinner <david@fromorbit.com>
Sat, 6 Mar 2010 00:24:38 +0000 (11:24 +1100)
committerDave Chinner <david@fromorbit.com>
Sat, 6 Mar 2010 00:24:38 +0000 (11:24 +1100)
When making a specifically sized scratch filesystem, we need to
calculate the size rather than assigning the caclculation expression
to a variable and passing that into the _scratch_mkfs_sized
function. Currently sized filesystems are failing to be made and the
code is falling back to full sized filesystems so we are not testing
enospc issues correctly.

Signed-off-by: Dave Chinner <david@fromorbit.com>
077
204
common.rc

diff --git a/077 b/077
index 72f1b2aa330ae7e69032f68258d95fa07bd706f0..4e12163cfa8edeb49a4d0dc3315369c2c77eae67 100755 (executable)
--- a/077
+++ b/077
@@ -62,7 +62,7 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-let SIZE=50*1024*1024
+SIZE=`expr 50 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE                   >>$seq.full 2>&1 \
        || _fail "mkfs failed"
 _scratch_mount                              >>$seq.full 2>&1 \
diff --git a/204 b/204
index 14ebcdc8e240d432b9785a280925fd931a9b1493..8b94f608f153ae9db9e9c80951b2bab0a61786d9 100755 (executable)
--- a/204
+++ b/204
@@ -40,7 +40,7 @@ _supported_os Linux
 
 _require_scratch
 
-SIZE=104*1024*1024
+SIZE=`expr 104 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE  &> /dev/null
 _scratch_mount
 
index ca2cd2cb2f99e1363b1de4d7cf22a8c18cd0ea58..d71e0a2d968876fc238d9cb578e1bca0a63b6bf8 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -320,7 +320,7 @@ _scratch_mkfs_sized()
     fssize=$1
     blocksize=$2
     [ -z "$blocksize" ] && blocksize=4096
-    let blocks=$fssize/$blocksize
+    blocks=`expr $fssize / $blocksize`
 
     case $FSTYP in
     xfs)