From: Eryu Guan <eguan@linux.alibaba.com>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Qu Wenruo <wqu@suse.com>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] fstests: allow running custom hooks
Date: Tue, 20 Jul 2021 12:05:28 +0800 [thread overview]
Message-ID: <20210720040528.GI60846@e18g06458.et15sqa> (raw)
In-Reply-To: <YPWF5iqB0fOYZd9K@mit.edu>
On Mon, Jul 19, 2021 at 10:02:14AM -0400, Theodore Y. Ts'o wrote:
> On Mon, Jul 19, 2021 at 03:13:37PM +0800, Qu Wenruo wrote:
> > This patch will allow fstests to run custom hooks before and after each
> > test case.
>
> Nice! This is better than what I had been doing which was to set:
>
> export LOGGER_PROG=/usr/local/lib/gce-logger
>
> ... and then parse the passed message to be logged for "run xfstests
> $seqnum", and which only worked to hook the start of each test.
>
> > diff --git a/README.hooks b/README.hooks
> > new file mode 100644
> > index 00000000..be92a7d7
> > --- /dev/null
> > +++ b/README.hooks
> > @@ -0,0 +1,72 @@
> > +To run extra commands before and after each test case, there is the
> > +'hooks/start.hook' and 'hooks/end.hook' files for such usage.
> > +
> > +Some notes for those two hooks:
> > +
> > +- Both hook files needs to be executable
> > + Or they will just be ignored
>
> Minor nit: I'd reword this as:
>
> - The hook script must be executable or it
> will be ignored.
>
> > diff --git a/check b/check
> > index bb7e030c..f24906f5 100755
> > --- a/check
> > +++ b/check
> > @@ -846,6 +846,10 @@ function run_section()
> > # to be reported for each test
> > (echo 1 > $DEBUGFS_MNT/clear_warn_once) > /dev/null 2>&1
> >
> > + # Remove previous $seqres.full before start hook
> > + rm -f $seqres.full
> > +
> > + _run_start_hook
>
> I wonder if it would be useful to have the start hook have a way to
> signal that a particular test should be skipped. This might allow for
> various programatic tests that could be inserted by the test runner
> framework.
I have the same question as Darrick does, we now have the exclude list
infra to skip a given set of tests, does that work in your case? Why do
you need pre hook to skip a test?
Thanks,
Eryu
>
> (E.g., this is the 5.4 kernel, we know this test is guaranteed to
> fail, so tell check to skip the test)
>
> - Ted
next prev parent reply other threads:[~2021-07-20 4:06 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 [this message]
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
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=20210720040528.GI60846@e18g06458.et15sqa \
--to=eguan@linux.alibaba.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).