From: Dave Chinner <david@fromorbit.com>
To: Zach Brown <zab@zabbo.net>
Cc: Eryu Guan <eguan@redhat.com>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/15] xfstests: new btrfs stress test cases
Date: Thu, 21 Aug 2014 19:35:05 +1000 [thread overview]
Message-ID: <20140821093505.GM26465@dastard> (raw)
In-Reply-To: <20140820182437.GJ429@lenny.home.zabbo.net>
On Wed, Aug 20, 2014 at 11:24:37AM -0700, Zach Brown wrote:
> On Thu, Aug 21, 2014 at 01:33:48AM +0800, Eryu Guan wrote:
> > This patchset add new stress test cases for btrfs by running two
> > different btrfs operations simultaneously under fsstress to ensure
> > btrfs doesn't hang or oops in such situations. btrfs scrub and
> > btrfs check will be run after each test.
>
> Cool.
>
> > The test matrix is the combination of 6 btrfs operations:
> >
> > balance
> > create/mount/umount/delete subvolume
> > replace device
> > scrub
> > defrag
> > remount with different compress algorithms
> >
> > Short descriptions:
> >
> > 057: balance-subvolume
> > 058: balance-scrub
> > 059: balance-defrag
> > 060: balance-remount
> > 061: balance-replace
> > 062: subvolume-replace
> > 063: subvolume-scrub
> > 064: subvolume-defrag
> > 065: subvolume-remount
> > 066: replace-scrub
> > 067: replace-defrag
> > 068: replace-remount
> > 069: scrub-defrag
> > 070: scrub-remount
> > 071: defrag-remount
>
> But I'm not sure it should be built this way.
>
> At the very least each operation's implementation should be in a shared
> function somewhere instead of being duplicated in each test.
>
> But I don't think there should be a seperate test for each combination.
> With a bit of fiddly bash you can automate generating unique
> combinations of operations that are defined as functions in one test.
>
> btrfs_op_balance()
> {
> echo hi
> }
>
> btrfs_op_scrub()
> {
> echo hi
> }
>
> btrfs_op_defrag()
> {
> echo hi
> }
>
> ops=($(declare -F | awk '/-f btrfs_op_/ {print $3}'))
> nr=${#ops[@]}
>
> for i in $(seq 0 $((nr - 2))); do
> for j in $(seq $((i + 1)) $((nr - 1))); do
> echo ${ops[i]} ${ops[j]}
> done
> done
Yes, it could be done like that, but historically that has proven to
be a bad idea. Multiplexing tens of tests within a single test is
just makes it hard to determine what failed. It might fail one
combination in 3.16, a different combo in 3.17 and yet another in
3.18. But from a reporting point of view, all we see is that a
single test failed, rather than being able to see that there were
three separate problems and that btrfs_op_scrub() was the common
factor in all three failures.
It's trivial to write this as a bunch of helper functions and then
boiler-plate the actual tests themselves. There will be little
difference in terms of run time, but we get much more fine-grained
control of execution and reporting....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2014-08-21 9:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 17:33 [PATCH 00/15] xfstests: new btrfs stress test cases Eryu Guan
2014-08-20 17:33 ` Eryu Guan
2014-08-20 17:33 ` [PATCH 01/15] btrfs: new test to run btrfs balance and subvolume test simultaneously Eryu Guan
2014-08-21 2:04 ` Qu Wenruo
2014-08-21 3:42 ` Eryu Guan
2014-08-21 9:01 ` Dave Chinner
2014-08-21 9:15 ` Qu Wenruo
2014-08-21 9:29 ` Dave Chinner
2014-08-21 11:18 ` Eryu Guan
2014-08-20 17:33 ` [PATCH 02/15] btrfs: new test to run btrfs balance and scrub simltaneously Eryu Guan
2014-08-20 17:33 ` [PATCH 03/15] btrfs: new test to run btrfs balance and defrag operations simultaneously Eryu Guan
2014-08-20 17:33 ` [PATCH 04/15] btrfs: new case to run btrfs balance and remount with different compress algorithms Eryu Guan
2014-08-20 17:33 ` [PATCH 05/15] btrfs: new case to run btrfs balance and device replace simultaneously Eryu Guan
2014-08-20 17:33 ` [PATCH 06/15] btrfs: new case to run btrfs subvolume create/delete operations " Eryu Guan
2014-08-20 17:33 ` [PATCH 07/15] btrfs: new case to run btrfs subvolume create/delete operations and scrub simultaneously Eryu Guan
2014-08-20 17:33 ` [PATCH 08/15] btrfs: new case to run btrfs subvolume create/delete and defrag operations simultaneously Eryu Guan
2014-08-20 17:33 ` [PATCH 09/15] btrfs: new case to run subvolume create/delete and remount with different compress algorithms Eryu Guan
2014-08-20 17:33 ` [PATCH 10/15] btrfs: new case to run device replace and scrub operations simultaneously Eryu Guan
2014-08-20 17:34 ` [PATCH 11/15] btrfs: new case to run device replace and defrag " Eryu Guan
2014-08-20 17:34 ` [PATCH 12/15] btrfs: new case to run device replace and remount with different compress algorithms simultaneously Eryu Guan
2014-08-20 17:34 ` [PATCH 13/15] btrfs: new case to run btrfs scrub and defrag operations simultaneously Eryu Guan
2014-08-20 17:34 ` [PATCH 14/15] btrfs: new case to run btrfs scrub and remount with different compress algorithms simultaneously Eryu Guan
2014-08-20 17:34 ` [PATCH 15/15] btrfs: new case to run defrag " Eryu Guan
2014-08-20 18:24 ` [PATCH 00/15] xfstests: new btrfs stress test cases Zach Brown
2014-08-21 3:18 ` Eryu Guan
2014-08-21 9:35 ` Dave Chinner [this message]
2014-08-21 16:03 ` Zach Brown
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=20140821093505.GM26465@dastard \
--to=david@fromorbit.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zab@zabbo.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;
as well as URLs for NNTP newsgroup(s).