From: Eryu Guan <eguan@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Christoph Hellwig <hch@lst.de>, fstests@vger.kernel.org
Subject: Re: [PATCH] generic/071: require falloc -k
Date: Wed, 20 Jul 2016 12:38:46 +0800 [thread overview]
Message-ID: <20160720043846.GS27776@eguan.usersys.redhat.com> (raw)
In-Reply-To: <7bd28494-84e9-1458-5e28-893d02dd5c06@sandeen.net>
On Mon, Jul 18, 2016 at 11:49:57PM -0700, Eric Sandeen wrote:
>
>
> On 7/18/16 9:17 PM, Christoph Hellwig wrote:
> > On Mon, Jul 18, 2016 at 04:47:14PM +0800, Eryu Guan wrote:
> >> This stops generic/071 from running no matter what filesystem it's
> >> testing, this is because _require_xfs_io_command only checks whether
> >> xfs_io knows the option (-k) by searching it in help message, not really
> >> running it, i.e.
> >
> > Well, we can at least add the documentation as that would be useful
> > on it's own. I'll look into a patch.
> >
> >> Perhaps we should update _require_xfs_io_command to actually run the
> >> command with the provided additional option?
> >
> > I'll have to look at the archives, but I remember we had a reason for
> > this way of probing for feature support.
>
> Some tests actually do run xfs_io on a real file, but we probably
> don't want to go that way.
>
> The test for finding it in help output seems way too specific,
>
> _require_xfs_io_command "pwrite" "-Z"
>
> fails as well because it doesn't hit the specific format in
> the grep.
Zorro's commit a6f6e594f74a ("common/rc: teach _require_xfs_io_command
accept multi-parameters") addressed this issue, but it requires
something like "_require_xfs_io_command pwrite -Z N" to match the help
message.
>
> What if we loosen up the test; is this too loose? (look for param
> preceded by whitespace or square bracket)
>
> diff --git a/common/rc b/common/rc
> index 6add69e..0eef3d5 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1907,7 +1907,7 @@ _require_xfs_io_command()
> _notrun "xfs_io $command failed (old kernel/wrong fs?)"
>
> test -z "$param" && return
> - $XFS_IO_PROG -c "help $command" | grep -q "^ $param --" || \
> + $XFS_IO_PROG -c "help $command" | egrep -qw "[ \[]$param" || \
> _notrun "xfs_io $command doesn't support $param"
> }
This looks better to me, at least better than current code :)
Thanks,
Eryu
prev parent reply other threads:[~2016-07-20 4:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 8:06 [PATCH] generic/071: require falloc -k Christoph Hellwig
2016-07-18 8:47 ` Eryu Guan
2016-07-19 4:17 ` Christoph Hellwig
2016-07-19 6:49 ` Eric Sandeen
2016-07-19 8:30 ` Christoph Hellwig
2016-07-20 4:52 ` Eryu Guan
2016-07-20 5:34 ` Eric Sandeen
2016-07-20 12:40 ` Eryu Guan
2016-07-20 4:38 ` Eryu Guan [this message]
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=20160720043846.GS27776@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=hch@lst.de \
--cc=sandeen@sandeen.net \
/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