From: Dave Chinner <david@fromorbit.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Filipe Manana <fdmanana@gmail.com>,
linux-f2fs-devel@lists.sourceforge.net,
fstests <fstests@vger.kernel.org>, Eryu Guan <guaneryu@gmail.com>
Subject: Re: [PATCH v2] generic: test i_mode recovery after power failure
Date: Thu, 7 Mar 2019 09:12:02 +1100 [thread overview]
Message-ID: <20190306221202.GG26298@dastard> (raw)
In-Reply-To: <CAOQ4uxigMqW8cQO0Veo_JXsVta6WvKv0QHAQ1KcVOwqY1CCL+A@mail.gmail.com>
On Wed, Mar 06, 2019 at 09:44:54AM +0200, Amir Goldstein wrote:
> > > >
> > > > Oh, wait, we *already have that infrastructure*: src/fsync-tester.c
> > > > and generic/311.
> > > >
>
> Right now 311 is not "quick".
> That means adding quick tests to it without breaking it up or declaring it quick
> is not a good idea.
Why would we need to change the group? Indeed, I almost never use
the "quick" group anymore because it doesn't mean "quickly run a
smoke test" anymore. It now just means "test doesn't take a long
time" but that still adds up to 30-60 minutes of runtime (depending
on storage) because of the hundreds of tests in the quick group.
If you are testing crash recovery changes, then you are likely
running the "log" group to execute all the crash recovery tests,
maybe the "metadata" group, and maybe the "shutdown" group.
So I don't think the this test not being in the "quick" group is
relevant at all.
> > > https://patchwork.kernel.org/patch/10042149/
> > >
> > > Or to avoid redundant copied code from generic/311 in each fsync related
> > > patch, do I need just add my case into fsync_tester.c? and before
> > > announcement of fstests master branch, we can add one testcase into
> > > generic/ directory, in that testcase we gather/test all new added cases in
> > > fsync_tester.c recently.
> >
> > Gathering them all into fsync-tester is what I'm suggesting should
> > be done....
> >
>
> We could introduce the concept of test cases into the test infrastructure.
> For example:
>
> --- a/tests/generic/311
> +++ b/tests/generic/311
> @@ -90,7 +90,7 @@ _mount_flakey
> buffered=0
> direct=1
>
> -for i in $(seq 1 20); do
> +for i in $(seq ${TEST_CASE_START:-1} ${TEST_CASE_END:-20}); do
> lockfs=1
> SEED=$i
> echo "Running test $i buffered, normal suspend"
> ---
>
> Adding a new test cases (beyond changing fsync_tester.c)
> requires:
> - Creating symlink tests/generic/311:21..24 -> 311
> - Writing golden output tests/generic/311:21..24.out
Why create complex new infrastructure for something we already have
mechanisms to do?
i.e. move the common code into common/<file>, include it in the new
test, and call:
_<common_test_func> 21 24
To constrain it to just the cases that this test runs.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2019-03-06 22:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 11:47 [PATCH v2] generic: test i_mode recovery after power failure Chao Yu
2019-03-05 14:41 ` Filipe Manana
2019-03-05 20:53 ` Dave Chinner
2019-03-06 2:29 ` Chao Yu
2019-03-06 5:00 ` Dave Chinner
2019-03-06 7:44 ` Amir Goldstein
2019-03-06 22:12 ` Dave Chinner [this message]
2019-03-07 7:12 ` Amir Goldstein
2019-03-07 20:22 ` Dave Chinner
2019-03-07 20:42 ` Jayashree Mohan
2019-03-09 10:15 ` Eryu Guan
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=20190306221202.GG26298@dastard \
--to=david@fromorbit.com \
--cc=amir73il@gmail.com \
--cc=fdmanana@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.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).