On Tue, Nov 27, 2018 at 01:43:07PM -0800, Gwendal Grignou wrote: > Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx> > --- > tests/ext4/032 | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/tests/ext4/032 b/tests/ext4/032 > index 8534ddd6..7d8c6da7 100755 > --- a/tests/ext4/032 > +++ b/tests/ext4/032 > @@ -35,12 +35,21 @@ ext4_online_resize() > local original_size=$1 > local final_size=$2 > local check_if_supported=${3:-0} > + local avail=`df -P $SCRATCH_DIR | awk 'END {print $4}'` > + local requested=$(($final_size * $BLK_SIZ)) > + > + if [ $avail -lt $requested ]; then > + echo "+++ not enough space on $SCRATCH_DIR: " \ > + "requested $requested only $avail left" | \ > + tee -a $seqres.full > + _notrun "incomplete test due to storage space constraint" > + fi This doesn't look right to me. We can safely truncate to a very large file size even if the size is bigger than the free space, it's just a typical sparse file. I guess the problem is that your SCRATCH_DEV is too small to hold the post-resize fs image. Thanks, Eryu > > ## Start with a clean image file. > echo "" > ${IMG_FILE} > echo "+++ truncate image file to $final_size" | \ > tee -a $seqres.full > - $XFS_IO_PROG -f -c "truncate $(($final_size * $BLK_SIZ))" ${IMG_FILE} > + $XFS_IO_PROG -f -c "truncate $requested" ${IMG_FILE} > LOOP_DEVICE=`_create_loop_device $IMG_FILE` > > echo "+++ create fs on image file $original_size" | \ > -- > 2.18.1 >