From: Dave Chinner <david@fromorbit.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: Block btrfs from test case generic/372
Date: Thu, 17 Nov 2016 08:12:41 +1100 [thread overview]
Message-ID: <20161116211241.GC28177@dastard> (raw)
In-Reply-To: <20161115081332.6432-1-quwenruo@cn.fujitsu.com>
(Did you forget to cc fstests@vger.kernel.org?)
On Tue, Nov 15, 2016 at 04:13:32PM +0800, Qu Wenruo wrote:
> Since btrfs always return the whole extent even part of it is shared
> with other files, so the hole/extent counts differs for "file1" in this
> test case.
>
> For example:
>
> /------ File 1 Extent 0-------------\
> / \
> |<----------Extent A------------------>|
> \ / \ /
> \ File 2/ \ File 2/
> Ext 0~4K Ext 64k~68K
>
> In that case, fiemap on File 1 will only return 1 large extent A with
> SHARED flag.
> While XFS will split it into 3 extents, first and last 4K with SHARED
> flag while the rest without SHARED flag.
fiemap should behave the same across all filesystems if at all
possible. This test failure indicates btrfs doesn't report an
accurate representation of shared extents which, IMO, is a btrfs
issue that needs fixing, not a test problem....
Regardless of this....
> This makes the test case meaningless as btrfs doesn't follow such
> assumption.
> So black list btrfs for this test case to avoid false alert.
... we are not going to add ad-hoc filesystem blacklists for
random tests.
Adding "blacklists" without any explanation of why something has
been blacklisted is simply a bad practice. We use _require rules
to specifically document what functionality is required for the
test and check that it provided. i.e. this:
_require_explicit_shared_extents()
{
if [ $FSTYP == "btrfs" ]; then
_not_run "btrfs can't report accurate shared extent ranges in fiemap"
fi
}
documents /exactly/ why this test is not run on btrfs.
And, quite frankly, while this is /better/ it still ignores the
fact we have functions like _within_tolerance for allowing a range
of result values to be considered valid rather than just a fixed
value. IOWs, changing the check of the extent count of file 1 post
reflink to use a _within_tolerance range would mean the test would
validate file1 on all reflink supporting filesystems and we don't
need to exclude btrfs at all...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next parent reply other threads:[~2016-11-16 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20161115081332.6432-1-quwenruo@cn.fujitsu.com>
2016-11-16 21:12 ` Dave Chinner [this message]
2016-11-17 1:13 ` [PATCH] fstests: Block btrfs from test case generic/372 Qu Wenruo
2016-11-15 8:14 Qu Wenruo
2016-11-15 8:57 ` Christoph Hellwig
2016-11-15 9:15 ` Qu Wenruo
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=20161116211241.GC28177@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox