Re: [PATCH 2/2] perf test: Test FASYNC with watermark wakeups.

From: Arnaldo Carvalho de Melo
Date: Sat Feb 24 2024 - 10:58:58 EST


On Sat, Feb 24, 2024 at 10:43:38AM +1300, Robert O'Callahan wrote:
> (I work with Kyle.)
>
> IMHO this is more of a bug fix than a feature. `man perf_event_open`
> expects this to work already: "watermark: If set, have an overflow
> notification happen when we cross the wakeup_watermark boundary" and
> later "Alternatively, the overflow events can be captured via a signal
> handler, by enabling I/O signaling".
>
> Bug fixes need regression tests. Such tests should fail on any kernel
> where the bug is present. It seems strange to expect each such test to
> detect whether the bug "should be fixed" in the kernel it's running on
> and skip when that's not the case. I haven't seen any other project
> try to do this. Instead (as in kernel selftests) the tests, the code
> under test, and any metadata about which tests are expected to pass
> are all in the repository together and updated together.
>
> It makes sense that tests for the code in tools/perf should not fail
> on older kernels, given that the code in tools/perf is expected to
> work on older kernels. But tests for bug fixes in the kernel itself
> should be expected to fail on older kernels and therefore should live
> somewhere else, IMHO.

That is fine, I was mostly trying to help in having the 'perf test'
patch posted to address the review comments from Ian.

And I'm biased because I work on a company that does lots of backports
and then test perf functionality using 'perf test'.

And also because the kernel now has this BTF information that can be
used for introspection.

Being able to run the installed 'perf' tool and check if some fix is in
place and its regression test is passing looked like an improvement
when compared to the selftests method.

If in the end people decide to do this in selftests, that is ok with me.

- Arnaldo