[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdjdAKIV39A-jpR5@x1>
Date: Fri, 23 Feb 2024 14:59:28 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Kyle Huey <me@...ehuey.com>
Cc: Ian Rogers <irogers@...gle.com>, Kyle Huey <khuey@...ehuey.com>,
Robert O'Callahan <robert@...llahan.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf test: Test FASYNC with watermark wakeups.
On Fri, Feb 23, 2024 at 09:35:29AM -0800, Kyle Huey wrote:
> On Thu, Feb 22, 2024 at 11:54 AM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> > fd = sys_perf_event_open(&attr, 0, -1, -1, perf_event_open_cloexec_flag());
> > if (fd < 0) {
> > if (attr_has_sigtrap()) {
> > pr_debug("FAILED sys_perf_event_open(): %s\n",
> > str_error_r(errno, sbuf, sizeof(sbuf)));
> > } else {
> > pr_debug("perf_event_attr doesn't have sigtrap\n");
> > ret = TEST_SKIP;
> > }
> > goto out_restore_sigaction;
> I think perhaps I'm barking up the wrong tree here. This seems like a
> ton of work just to write a regression test. Maybe I should be doing
> this in tools/testing/selftests instead?
Well, if it tests a perf feature, then yeah, that would be better placed
in 'perf test'.
Maybe you can just assume this will run just on modern kernels where
this feature is expected to be present and then add some pr_debug()
stating that maybe this feature is not present in the kernel.
For the vast majority of cases this will be enough, so that is what I
encourage you to do now.
Its possible that distros, like Red Hat, end up backporting first the
perf tools with this test and not the feature it is being tested, if
that happens, then it will eventually come to my attention and I will be
able to do the BTF treatment, as in that case even a test based on the
kernel version would be insufficient.
- Arnaldo
Powered by blists - more mailing lists