From: Zorro Lang <zlang@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: cem@kernel.org, fstests@vger.kernel.org, jencce2002@qq.com,
Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v2] add tmt as a new output format
Date: Wed, 25 Nov 2026 04:10:31 +0800 [thread overview]
Message-ID: <awXtyUXGTDbP5KLd@zlang-mailbox> (raw)
In-Reply-To: <awWiVSZTul_KdB3H@aalbersh-thinkpadx1carbongen13.rmtcz.csb>
On Tue, Nov 24, 2026 at 03:51:56PM +0100, Andrey Albershteyn wrote:
> On 2026-11-21 07:19:26, Zorro Lang wrote:
> > On Thu, Nov 19, 2026 at 01:38:55PM +0100, cem@kernel.org wrote:
> > > From: Carlos Maiolino <cmaiolino@redhat.com>
> > >
> > > I've been trying to expand my testing matrix leveraging the testing-farm
> > > cloud (https://testing-farm.io/), which is a public testing cloud available
> > > for opensource testing.
> > >
> > > Testing-farm uses tmt (https://github.com/teemtee) to orchestrate the
> > > tests within the provisioned VMs.
> > > tmt however expects each individual test to be, well, an individual
> > > test so by default it would put a whole xfstests run as a single test
> > > case with a looooong report.
> > > However we can use a tmt-report-result tool to report each test ran
> > > individually as a sub-test, so the report looks a bit more granular,
> > > easy to read and prevent my eyes from bleeding while looking at its
> > > testing reports.
> > >
> > > I know tmt can also be used to orchestrate tests on a local machine.
> > > Although I have no use for that, it might be useful for someone else,
> > > reason why at the end of the run it will also print out the tmt report
> > > file location. This also makes the output consistent to what xunit
> > > format does.
> > >
> > > Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> > > ---
> > > V2:
> > > - Add Murphy's suggestion to the log output if it fails
> > > to add a test result to the final report
> >
> > Hi Carlos,
> >
> > Sorry for the late reply. I wanted to wait and see what others thought about
> > this first, though it seems there hasn't been much interest or feedback on
> > it so far :-D
> >
> > ...
> >
> > More recently before I was laid off from Red Hat, I had been considering adding
> > a generic hook mechanism to fstests instead, if a user sets an environment
> > variable (e.g., REPORT_TESTCASE_HOOK="/path/to/my-script.sh"), fstests would
> > invoke that script at the end of each testcase with arguments like (sect_name,
> > test_seq, test_status, test_time, report_dir). That way, any CI system or test
> > harness could simply provide its own lightweight hook.sh to reuse this reporting
> > interface, without having to hardcode vendor or framework-specific tools into
> > common/report. Also I thought about adding a streaming format like JSON Lines,
> > where each completed test appends a self-contained, valid JSON record on the fly,
> > ensuring that whatever has been flushed to disk remains intact and parseable even
> > if the system crashes midway through a run.
>
> Regarding the hooks, I continue to pull this patch by Dave [1]
> into my test machines; it adds generic per-test hooks. I use it
> mostly to run trace-cmd but this could probably be useful for some
> kind of additional processing. I find it pretty useful.
>
> The original posting didn't get merged, but I can resend it if other are
> interested.
>
> 1: https://lore.kernel.org/all/20210722064725.3077558-1-david@fromorbit.com/
Hi Andrey,
Thanks a lot for pointing me to this patch! Classic Dave, while the design has
some tricky parts, the overall idea is great. This is actually the exact kind
of external hook mechanism I mentioned earlier, and it's a shame I missed it
at the time.
However, this design doesn't quite fit Carlos's use case. Since it places the
hooks inside `_begin_fstest` and `_cleanup`, it won't be able to capture
golden mismatch results etc.
What I have in mind is introducing two hooks: a `pre-test` hook placed right
before `_run_seq` is called in `check`, and a `post-test` hook inside
`_stash_test_status`. That way, the `post-test` hook can get the test results
and meet Carlos's requirements. *But!* this execution window might be a bit
too wide for `ftrace`.
So I'm thinking maybe we could expose three hooks instead: `pre-test`,
`post-test`, and `post-result`:
- `pre-test`: stays the same (right before `_run_seq`).
- `post-test`: runs right after `_run_seq` finishes.
- `post-result`: runs inside `_stash_test_status` (or slightly later).
This would keep `post-test` isolated from any interference caused by post-run
operations like core dumps, `umount`, `_check_filesystems`, or `_check_dmesg`.
What do you think? This is just an initial thought. I can find some time to
implement it and send out a patch for everyone to review. Feel free to tell
me if anyone has more suggestions :)
Thanks,
Zorro
>
> --
> - Andrey
>
>
next prev parent reply other threads:[~2026-11-24 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 12:38 [PATCH v2] add tmt as a new output format cem
2026-11-20 23:19 ` Zorro Lang
2026-11-21 9:57 ` Carlos Maiolino
2026-11-21 10:51 ` Zorro Lang
[not found] ` <tencent_71E835E43646DBCDDC4D2ACA4123DF115506@qq.com>
2026-11-23 7:50 ` Carlos Maiolino
[not found] ` <tencent_77C1DC496ADB4131DF06D5ED75F5F66E9B06@qq.com>
2026-11-23 7:43 ` Carlos Maiolino
2026-11-24 10:40 ` Zhou Xiong
2026-11-24 14:51 ` Andrey Albershteyn
2026-11-24 20:10 ` Zorro Lang [this message]
2026-11-21 12:00 ` Zorro Lang
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=awXtyUXGTDbP5KLd@zlang-mailbox \
--to=zlang@kernel.org \
--cc=aalbersh@redhat.com \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=jencce2002@qq.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.