From: Namhyung Kim <namhyung@kernel.org>
To: James Clark <james.clark@linaro.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Jakub Brnak <jbrnak@redhat.com>, Leo Yan <leo.yan@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH v3 3/4] perf test probe_vfs_getname: Fix missing debuginfo detection
Date: Mon, 9 Nov 2026 18:50:48 -0800 [thread overview]
Message-ID: <avKGiPiE4Ag3PS33@z2> (raw)
In-Reply-To: <ecd60873-644e-4b8b-a786-ec84276a99c4@linaro.org>
On Mon, Nov 09, 2026 at 12:11:09PM +0000, James Clark wrote:
>
>
> On 09/11/2026 10:17, James Clark wrote:
> > skip_if_no_debuginfo() looks for the errors that 'perf probe' prints when
> > there is no debuginfo in the output of add_probe_vfs_getname(). But since
> > commit 92b664dcefab ("perf test probe_vfs_getname: Skip if no suitable
> > line detected"), add_probe_vfs_getname() returns early without adding a
> > probe if 'perf probe -L' doesn't find the line, which is also what
> > happens when there is no debuginfo. The error from 'perf probe -L' is
> > discarded, so the debuginfo errors are never found.
> >
> > This causes the debuginfo dependent subtests of the
> > "perftool-testsuite_probe" test to fail instead of being skipped on
> > kernels without debuginfo, because test_adding_kernel.sh calls
> > skip_if_no_debuginfo() unconditionally. The other users only call it
> > when add_probe_vfs_getname() returns 1, so they aren't affected.
> >
> > Fix it by doing a dry run of a probe that needs debuginfo instead. This
> > works without libdw too, where 'perf probe -L' isn't available, and also
> > avoids adding a real probe just to check for debuginfo. This fixes the
> > "perftool-testsuite_probe" test:
> >
> > $ sudo perf test -vvv "perftool-testsuite_probe"
> > ...
> > -- [ FAIL ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf probe -l (output regexp parsing)
> > ...
> > -- [ FAIL ] -- perf_probe :: test_adding_kernel :: wildcard adding support (command exitcode + output regexp parsing)
> > ...
> > -- [ FAIL ] -- perf_probe :: test_adding_kernel :: non-existing variable (output regexp parsing)
> > ...
> > ## [ FAIL ] ## perf_probe :: test_adding_kernel SUMMARY :: 3 failures found
> > ...
> > 189: perftool-testsuite_probe : FAILED!
> >
> > Fixes: 92b664dcefab ("perf test probe_vfs_getname: Skip if no suitable line detected")
> > Signed-off-by: James Clark <james.clark@linaro.org>
> > ---
> > tools/perf/tests/shell/lib/probe_vfs_getname.sh | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > index 57a59ae7d4ae..98cfb02cf7c6 100644
> > --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
> > @@ -64,7 +64,11 @@ add_probe_vfs_getname() {
> > }
> > skip_if_no_debuginfo() {
> > - add_probe_vfs_getname -v 2>&1 | grep -E -q "^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)" && return 2
> > + # Dry run a probe that needs debuginfo.
> > + perf probe -n -v 'getname_flags $params' 2>&1 | grep -q \
> > + -e "^Failed to find the path for the kernel" \
> > + -e "^Debuginfo-analysis is not supported" \
> > + -e "file has no debug information" && return 2
> > return 1
> > }
> >
>
> Hi Namhyung,
>
> This patch causes a shellcheck issue with certain versions. Not sure if you
> applied it already, but I'll send another version anyway:
>
> In tests/shell/./lib/probe_vfs_getname.sh line 30:
> add_probe_vfs_getname() {
> ^-- SC2120 (warning): add_probe_vfs_getname references arguments, but none
> are ever passed.
No worries, I'll pick v4.
Thanks,
Namhyung
next prev parent reply other threads:[~2026-11-10 2:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 10:17 [PATCH v3 0/4] perf tools: LLVM dwarf and flaky test fixes James Clark
2026-11-09 10:17 ` [PATCH v3 1/4] perf libdw: Find the CU by iterating all CUs when aranges are missing James Clark
2026-11-09 10:25 ` sashiko-bot
2026-11-09 10:17 ` [PATCH v3 2/4] perf dwarf-aux: Support DW_OP_addrx locations for global variables James Clark
2026-11-09 10:25 ` sashiko-bot
2026-11-09 10:17 ` [PATCH v3 3/4] perf test probe_vfs_getname: Fix missing debuginfo detection James Clark
2026-11-09 10:22 ` sashiko-bot
2026-11-09 12:11 ` James Clark
2026-11-10 2:50 ` Namhyung Kim [this message]
2026-11-09 10:17 ` [PATCH v3 4/4] perf test: Don't starve per-process tests with system-wide events James Clark
2026-11-09 10:22 ` sashiko-bot
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=avKGiPiE4Ag3PS33@z2 \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jbrnak@redhat.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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.