diff mbox

[xfstests-bld] test-appliance: detect 'mkfs.f2fs -f' support by grepping help output

Message ID 20180416220621.196700-1-ebiggers3@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Biggers April 16, 2018, 10:06 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

Grep the help output rather than the binary itself.  This matches the
detection method that was implemented in xfstests common/config.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Theodore Ts'o April 17, 2018, 4:08 p.m. UTC | #1
On Mon, Apr 16, 2018 at 03:06:21PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Grep the help output rather than the binary itself.  This matches the
> detection method that was implemented in xfstests common/config.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
index 0efcb76..b0c2196 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
@@ -20,7 +20,7 @@  function format_filesystem()
     local dev="$1"
     local opts="$2"
 
-    if grep -q 'force overwrite' /sbin/mkfs.f2fs; then
+    if /sbin/mkfs.f2fs --help |& grep -q "[[:space:]]-f[[:space:]|]"; then
 	# f2fs-tools v1.9+
 	opts+=" -f"
     fi