All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: fstests@vger.kernel.org
Cc: hch@infradead.org, linux-ext4@vger.kernel.org,
	wangxg.fnst@cn.fujitsu.com, eguan@redhat.com,
	Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 1/2] ext4: define MKFS_EXT4_PROG and use it instead of "mkfs.ext4" / "mkfs -t ext4"
Date: Sun,  7 Sep 2014 22:06:07 -0400	[thread overview]
Message-ID: <1410141968-17551-1-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <20140907192110.GC1066@thunk.org>

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/config   | 1 +
 common/rc       | 7 +++++--
 tests/btrfs/012 | 1 -
 tests/ext4/003  | 2 +-
 tests/ext4/306  | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/common/config b/common/config
index 10cc6fe..f038813 100644
--- a/common/config
+++ b/common/config
@@ -209,6 +209,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 16da898..285bd7c 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)
 	 ;;
 esac
@@ -451,7 +454,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=$?
 
@@ -466,7 +469,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 f7e5da5..124c8ae 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 a2e9d75..53875a9 100755
--- a/tests/ext4/003
+++ b/tests/ext4/003
@@ -43,7 +43,7 @@ _require_ext4_bigalloc
 
 rm -f $seqres.full
 
-mkfs.ext4 -F -O bigalloc -C 65536  -g 256 $SCRATCH_DEV 512m \
+$MKFS_EXT4_PROG -F -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 fd5c3a2..edc0204 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
-mkfs.ext4 -F -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
+$MKFS_EXT4_PROG -F -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
 _scratch_mount || _fail "couldn't mount fs"
 
 # Create a small non-extent-based file
-- 
2.1.0


  reply	other threads:[~2014-09-08  2:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 12:29 [PATCH] ext4: use mkfs.ext4 -F instead of piping in yes Theodore Ts'o
2014-09-07 15:49 ` Christoph Hellwig
2014-09-07 19:21   ` Theodore Ts'o
2014-09-08  2:06     ` Theodore Ts'o [this message]
2014-09-08  2:06       ` [PATCH 2/2] ext4: speed up _require_ext4_bigalloc and _require_ext4_mkfs_bigalloc Theodore Ts'o
2014-09-08  9:50         ` Dave Chinner
2014-09-08 12:02           ` Theodore Ts'o
2014-09-08 12:15             ` [PATCH -v2] " Theodore Ts'o
2014-09-08 12:36               ` Dave Chinner
2014-09-08 12:39                 ` Theodore Ts'o
2014-09-08 12:50                   ` Dave Chinner
2014-09-08 12:35       ` [PATCH 1/2] ext4: define MKFS_EXT4_PROG and use it instead of "mkfs.ext4" / "mkfs -t ext4" Dave Chinner
2014-09-27  0:11         ` Dave Chinner
2014-09-27 22:12           ` Theodore Ts'o
2014-09-27 22:17             ` [PATCH 1/3] " Theodore Ts'o
2014-09-27 22:17               ` [PATCH 2/3] ext4: use mkfs.ext4 -F instead of piping in yes Theodore Ts'o
2014-09-27 22:17               ` [PATCH 3/3] ext4: speed up _require_ext4_bigalloc and _require_ext4_mkfs_bigalloc Theodore Ts'o
2014-09-09 11:49 ` [PATCH] ext4: use mkfs.ext4 -F instead of piping in yes Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410141968-17551-1-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wangxg.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.