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 01/10] fstests: common: Introduce function to check qgroup correctness
Date: Wed, 30 Nov 2016 08:01:55 +1100 [thread overview]
Message-ID: <20161129210155.GD31101@dastard> (raw)
In-Reply-To: <20161129073303.14776-2-quwenruo@cn.fujitsu.com>
On Tue, Nov 29, 2016 at 03:32:54PM +0800, Qu Wenruo wrote:
> Old btrfs qgroup test cases uses fix golden output numbers, which limits
> the coverage since they can't handle mount options like compress or
> inode_map, and cause false alert.
>
> Introduce _btrfs_check_scratch_qgroup() function to check qgroup
> correctness using "btrfs check --qgroup-report" function, which will
> follow the way kernel handle qgroup and are proved very reliable.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> common/rc | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 8c99306..35d2d56 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3018,6 +3018,25 @@ _require_deletable_scratch_dev_pool()
> done
> }
>
> +# We check if "btrfs check" support to check qgroup correctness
> +# Old fixed golden output can cover case like compress and inode_map
> +# mount options, which limits the coverage
> +_require_btrfs_check_qgroup()
> +{
> + _require_command "$BTRFS_UTIL_PROG" btrfs
> + output=$($BTRFS_UTIL_PROG check --help | grep "qgroup-report")
> + if [ -z "$output" ]; then
> + _notrun "$BTRFS_UTIL_PROG too old (must support 'check --qgroup-report')"
> + fi
> +}
Why wouldn't this just set a global variable that you then
check in _check_scratch_fs and run the _btrfs_check_scratch_qgroup()
call then?
What about all the tests that currently run without this
functionality being present? They will now notrun rather than use
the golden output match - this seems like a regression to me,
especially for distro QE testing older kernel/progs combinations...
> +
> +_btrfs_check_scratch_qgroup()
> +{
> + _require_btrfs_check_qgroup
This needs to go in the test itself before the test is run,
not get hidden in a function call at the end of the test.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-11-29 21:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 7:32 [PATCH 00/10] Enhance btrfs qgroup test group coverage to support more mount options Qu Wenruo
2016-11-29 7:32 ` [PATCH 01/10] fstests: common: Introduce function to check qgroup correctness Qu Wenruo
2016-11-29 8:16 ` Eryu Guan
2016-11-29 8:44 ` Qu Wenruo
2016-11-29 21:01 ` Dave Chinner [this message]
2016-11-30 0:56 ` Qu Wenruo
2016-11-30 1:23 ` Dave Chinner
2016-11-29 7:32 ` [PATCH 02/10] fstests: btrfs/017: Use new _btrfs_check_scratch_qgroup function Qu Wenruo
2016-11-29 7:32 ` [PATCH 03/10] fstests: btrfs/022: Add extra qgroup verification after each work Qu Wenruo
2016-11-29 7:32 ` [PATCH 04/10] fstests: btrfs/028: Use new wrapped _btrfs_check_scratch_qgroup function Qu Wenruo
2016-11-29 7:32 ` [PATCH 05/10] fstests: btrfs/042: Add extra qgroup verification Qu Wenruo
2016-11-29 7:32 ` [PATCH 06/10] fstests: btrfs/091: Use _btrfs_check_scratch_qgroup other than fixed golden output Qu Wenruo
2016-11-29 7:33 ` [PATCH 07/10] fstests: btrfs/099: Add extra verification for qgroup Qu Wenruo
2016-11-29 7:33 ` [PATCH 08/10] fstests: btrfs/104: Use _btrfs_check_scratch_qgroup to replace open codes Qu Wenruo
2016-11-29 7:33 ` [PATCH 09/10] fstests: btrfs/122: Use _btrfs_check_scratch_qgroup to replace open code Qu Wenruo
2016-11-29 7:33 ` [PATCH 10/10] fstests: btrfs/123: " 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=20161129210155.GD31101@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