public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: "Theodore Y . Ts'o" <tytso@mit.edu>
Cc: fstests@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: [xfstests-bld PATCH] test-appliance: detect 'mkfs.f2fs -f' support by grepping help output
Date: Mon, 16 Apr 2018 15:06:21 -0700	[thread overview]
Message-ID: <20180416220621.196700-1-ebiggers3@gmail.com> (raw)

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(-)

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
-- 
2.17.0.484.g0c8726318c-goog


             reply	other threads:[~2018-04-16 22:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 22:06 Eric Biggers [this message]
2018-04-17 16:08 ` [xfstests-bld PATCH] test-appliance: detect 'mkfs.f2fs -f' support by grepping help output Theodore Y. Ts'o

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=20180416220621.196700-1-ebiggers3@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=ebiggers@google.com \
    --cc=fstests@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox