From: Theodore Ts'o Date: Mon, 29 Sep 2014 02:46:43 +0000 (+1000) Subject: ext4: define MKFS_EXT4_PROG X-Git-Tag: v2022.05.01~3071 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4e2fa4d0db6f4bdf89e91c79c0ab86befb167b7e;p=xfstests-dev.git ext4: define MKFS_EXT4_PROG And use it instead of "mkfs.ext4" / "mkfs -t ext4" Signed-off-by: Theodore Ts'o Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/common/config b/common/config index fc21b375..d68d4d0c 100644 --- a/common/config +++ b/common/config @@ -210,6 +210,7 @@ case "$HOSTOS" in ;; Linux) export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" + export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`" export MKFS_UDF_PROG="`set_prog_path mkudffs`" export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`" export BTRFS_UTIL_PROG="`set_prog_path btrfs`" diff --git a/common/rc b/common/rc index b8f711a5..35d7d5dc 100644 --- a/common/rc +++ b/common/rc @@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + ext4) + [ "$MKFS_EXT4_PROG" = "" ] && _fatal "mkfs.ext4 not found" + ;; nfs) ;; cifs) @@ -459,7 +462,7 @@ _scratch_mkfs_ext4() local tmp_dir=/tmp/ - /sbin/mkfs -t ext4 -- -F $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \ + $MKFS_EXT4_PROG -F $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \ 2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd local mkfs_status=$? @@ -474,7 +477,7 @@ _scratch_mkfs_ext4() ) >> $seqres.full # running mkfs again. overwrite previous mkfs output files - /sbin/mkfs -t ext4 -- -F $extra_mkfs_options $SCRATCH_DEV \ + $MKFS_EXT4_PROG -F $extra_mkfs_options $SCRATCH_DEV \ 2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd local mkfs_status=$? fi diff --git a/tests/btrfs/012 b/tests/btrfs/012 index f7e5da5c..124c8ae0 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -55,7 +55,6 @@ _supported_os Linux _require_scratch BTRFS_CONVERT_PROG="`set_prog_path btrfs-convert`" -MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`" E2FSCK_PROG="`set_prog_path e2fsck`" _require_command $BTRFS_CONVERT_PROG btrfs-convert diff --git a/tests/ext4/003 b/tests/ext4/003 index 572e685d..fde0e9c1 100755 --- a/tests/ext4/003 +++ b/tests/ext4/003 @@ -43,7 +43,7 @@ _require_ext4_bigalloc rm -f $seqres.full -yes | mkfs.ext4 -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \ +yes | $MKFS_EXT4_PROG -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \ >> $seqres.full 2>&1 _scratch_mount || _fail "couldn't mount fs" diff --git a/tests/ext4/306 b/tests/ext4/306 index fd50b0e8..caffe0e4 100755 --- a/tests/ext4/306 +++ b/tests/ext4/306 @@ -48,7 +48,7 @@ _require_scratch rm -f $seqres.full # Make a small ext4 fs with extents disabled & mount it -yes | mkfs.ext4 -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1 +yes | $MKFS_EXT4_PROG -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1 _scratch_mount || _fail "couldn't mount fs" # Create a small non-extent-based file