From: Qu Wenruo <wqu@suse.com>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
Dave Chinner <david@fromorbit.com>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>,
Eryu Guan <eguan@linux.alibaba.com>,
"fstests@vger.kernel.org" <fstests@vger.kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH RFC] fstests: allow running custom hooks
Date: Wed, 21 Jul 2021 10:57:45 +0800 [thread overview]
Message-ID: <ef333cb5-52ff-98da-0cfa-d89c39359c0b@suse.com> (raw)
In-Reply-To: <DM6PR04MB70812AEDDAB6DE7951F4FBBDE7E39@DM6PR04MB7081.namprd04.prod.outlook.com>
On 2021/7/21 上午10:23, Damien Le Moal wrote:
>>
>> I'm pretty clear about the hook I supposed, it's not for stable ABI or
>> complex framework, just a simple kit to make things a little easier.
>>
>> The single purpose is just to make some throw-away debug setup simpler.
>>
>> Whether debug tool should be throw-away is very debatable, and you're
>> pushing your narrative so much, that's very annoying already.
>>
>> You can have your complex framework for your farm, I can also have my
>> simple setup running on RPI4.
>>
>> I won't bother however you build your debug environment, nor you should.
>>
>> Sometimes I already see the test setup of fstests too complex.
>> I totally understand it's for the portability and reproducibility, but
>> for certain debugs, I prefer to craft a small bash script with the core
>> contents copied from fstests, with all the complex probing/requirement,
>> which can always populate the ftrace buffer.
>>
>>
>> If you believe your philosophy that every test tool should be a complex
>> mess, you're free to do whatever you always do.
>>
>> And I can always express my objection just like you.
>>
>> So, you want to build a complex framework using the simple hook, I would
>> just say NO.
>
> I think that Dave's opinion is actually the reverse of this: hooks, if well
> designed, can be useful and facilitate adding functionalities to a complex test
> framework. And sure, the hook infrastructure implementation can in itself be
> complex, but if well designed, its use can be, and should be, very simple.
In fact, if we really integrate the hook into the fstests to the
standard of Dave, I doubt it can be that simple ever.
E.g. if the hook is going to inherit all the fstests shell macros, from
_not_run() to various _require_*, then it's completely the opposite what
I want, and it's not going to be simpler than writing a proper test case.
What I original want is so simple that for start hook, it only accepts
one parameter (for the sequence number), one environment variable (for
the temporary path).
That's the level of simplicity I want, no complex calls/probes just a
proper test case.
Yes, a well designed hook can do that without problem, as it will be
superset of the simple hook.
But then when one is going to do complex things, and reading the doc, it
will be way more complex than the original purpose.
And I hate to even have such possibility to be complex.
Ironically not to mention the maintaining effort involved. E.g. if the
hook is going to inherit those shell variables/macors, then any changing
in the fstests itself will affect the hooks, no matter if there is any
real users of such complex thing.
>
> Implementation is done once. The complexity at that stage matters much less than
> the end result usability. As a general principle, the more time one put in
> design and development, the better the end result. Here, that means hooks being
> useful, flexible, extensible, and reusable.
Hard to say.
I still can't yet get used to the preamble change introduced recently.
(The group list not properly updated)
And it's pretty clear it won't be the last change of the fstest
infrastructure.
Hook won't be more stable than fstests itself, and it will take time to
maintain, no matter if there is really users for it.
>
> And one of the functionality of the hook setup could be "temporary, external
> hook" for some very special case debugging as you seem to need that. What you
> want to do and what Dave is proposing are not mutually exclusive.
Yeah, it's a subset in theory.
But then that's completely unrelated to my initial purpose.
I won't object if someone is willing to do that separately, and may be
even happy if a such dedicated, simple hook can be provided without
reading the complex doc/design of the framework.
But putting tons of unrelated things into an originally simple purpose, no.
Please do that in a separate patch/thread for the complex hook framework
then.
Thanks,
Qu
>
>>
>> And you have made yourself clear that you want to make your debug setup
>> complex and stable, then I understand and just won't waste my time on
>> someone can't understand something KISS.
>>
>> Thanks,
>> Qu
>>
>>>
>>> Cheers,
>>>
>>> Dave.
>>>
>>
>
>
next prev parent reply other threads:[~2021-07-21 2:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 7:13 [PATCH RFC] fstests: allow running custom hooks Qu Wenruo
2021-07-19 14:02 ` Theodore Y. Ts'o
2021-07-19 22:06 ` Qu Wenruo
2021-07-20 0:43 ` Theodore Y. Ts'o
2021-07-20 0:50 ` Qu Wenruo
2021-07-20 4:05 ` Eryu Guan
2021-07-20 0:25 ` Dave Chinner
2021-07-20 0:36 ` Qu Wenruo
2021-07-20 2:14 ` Dave Chinner
2021-07-20 2:45 ` Qu Wenruo
2021-07-20 6:43 ` Dave Chinner
2021-07-20 7:26 ` Qu Wenruo
2021-07-20 7:57 ` Eryu Guan
2021-07-20 8:29 ` Qu Wenruo
2021-07-20 8:44 ` Qu Wenruo
2021-07-20 15:38 ` Theodore Y. Ts'o
2021-07-20 22:34 ` Qu Wenruo
2021-07-21 1:11 ` Dave Chinner
2021-07-21 1:52 ` Qu Wenruo
2021-07-21 2:23 ` Damien Le Moal
2021-07-21 2:57 ` Qu Wenruo [this message]
2021-07-21 23:28 ` Dave Chinner
2021-07-22 14:41 ` Theodore Ts'o
2021-07-22 22:21 ` Dave Chinner
2021-07-23 3:30 ` Theodore Ts'o
2021-07-23 4:32 ` Eryu Guan
2021-07-20 1:16 ` Darrick J. Wong
2021-07-20 1:24 ` 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=ef333cb5-52ff-98da-0cfa-d89c39359c0b@suse.com \
--to=wqu@suse.com \
--cc=Damien.LeMoal@wdc.com \
--cc=david@fromorbit.com \
--cc=eguan@linux.alibaba.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=tytso@mit.edu \
/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