]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
ext4/306: Fixup resize2fs usage
authorJan Kara <jack@suse.cz>
Tue, 29 May 2018 16:56:01 +0000 (18:56 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 3 Jun 2018 14:16:15 +0000 (22:16 +0800)
Use $RESIZE2FS_PROG instead of direct name to call program with full
path. Also add an appropriate feature test.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/ext4/306

index 7d00bad6c1ce080883ac8064813b3e0afd67e709..5b3744d0597c05212e05e6c78f15807f165792c3 100755 (executable)
@@ -44,6 +44,7 @@ _supported_fs ext4
 _supported_os Linux
 
 _require_scratch
+_require_command "$RESIZE2FS_PROG" resize2fs
 
 rm -f $seqres.full
 
@@ -67,7 +68,7 @@ df -h $SCRATCH_MNT >> $seqres.full
 
 # Grow fs by 512m
 echo "Resize to 1g"
-resize2fs $SCRATCH_DEV 1g >> $seqres.full 2>&1 || _fail "Could not resize to 1g"
+$RESIZE2FS_PROG $SCRATCH_DEV 1g >> $seqres.full 2>&1 || _fail "Could not resize to 1g"
 df -h $SCRATCH_MNT >> $seqres.full
 
 # See if we can add more blocks to the files