public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Athira Rajeev <atrajeev@linux.ibm.com>
To: Ian Rogers <irogers@google.com>
Cc: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
	jbrnak@redhat.com, mpetlan@redhat.com, tmricht@linux.ibm.com,
	maddy@linux.ibm.com, namhyung@kernel.org,
	linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	hbathini@linux.vnet.ibm.com, Tejas.Manhas1@ibm.com,
	Tanushree.Shah@ibm.com, Shivani.Nittor@ibm.com
Subject: Re: [PATCH] tools/perf/tests: Update debuginfo check in skip_if_no_debuginfo
Date: Wed, 18 Mar 2026 11:47:16 +0530	[thread overview]
Message-ID: <D8DCECF2-017F-4B09-9E95-7D5CF992B0FB@linux.ibm.com> (raw)
In-Reply-To: <CAP-5=fU8VojUXB9oD1u713WeHQ9oLBn0fQ0=Kif0XetxMg7MGw@mail.gmail.com>



> On 17 Mar 2026, at 9:34 PM, Ian Rogers <irogers@google.com> wrote:
> 
> On Sat, Mar 14, 2026 at 1:37 AM Athira Rajeev <atrajeev@linux.ibm.com> wrote:
>> 
>> Perf test perftool-testsuite_probe fails as below:
>> 
>> Regexp not found: "\s*probe:inode_permission(?:_\d+)?\s+\(on inode_permission(?:[:\+][0-9A-Fa-f]+)?@.+\)"
>> -- [ FAIL ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf probe -l (output regexp parsing)
>> -- [ PASS ] -- perf_probe :: test_adding_kernel :: removing multiple probes
>> Regexp not found: "probe:vfs_mknod"
>> Regexp not found: "probe:vfs_create"
>> Regexp not found: "probe:vfs_rmdir"
>> Regexp not found: "probe:vfs_link"
>> Regexp not found: "probe:vfs_write"
>> -- [ FAIL ] -- perf_probe :: test_adding_kernel :: wildcard adding support (command exitcode + output regexp parsing)
>> Regexp not found: "somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64"
>> Regexp not found: "in this function|at this address"
>> -- [ FAIL ] -- perf_probe :: test_adding_kernel :: non-existing variable (output regexp parsing)
>> ## [ FAIL ] ## perf_probe :: test_adding_kernel SUMMARY :: 3 failures found
>> 
>> Further analysing, the failed testcase is for "test_adding_kernel".
>> If the kernel debuginfo is missing, perf probe fails as below:
>> 
>> perf probe -nf --max-probes=512 -a 'vfs_* $params'
>> Failed to find the path for the kernel: No such file or directory
>>  Error: Failed to add events.
>> 
>> skip_if_no_debuginfo has check to handle whether debuginfo is present
>> and the testcase checks for debuginfo since this :
>> commit 90d32e92011e ("tools/perf: Handle perftool-testsuite_probe
>> testcases fail when kernel debuginfo is not present")
>> 
>> Recently a change got added in "tests/shell/lib/probe_vfs_getname.sh"
>> via this another fix:
>> commit 92b664dcefab ("perf test probe_vfs_getname: Skip if no suitable
>> line detected")
>> Since this commit, first add_probe_vfs_getname is used to prevent false
>> failures. And based on return code of add_probe_vfs_getname, skip_if_no_debuginfo
>> is used to skip testcase if debuginfo is present. And this modified other
>> testcases to call add_probe_vfs_getname first and invoke
>> skip_if_no_debuginfo based on return value.
>> 
>> The tests in test_adding_kernel.sh which depends on presence of
>> debuginfo are:
>> 1. probe add for inode_permission
>> 2. probe max-probes option using 'vfs_* $params'
>> 3. non-existing variable probing
>> 
>> For these tests, probe check for specific line is not required.
>> So call skip_if_no_debuginfo with argument to say if line check is
>> needed. This is to convey to skip_if_no_debuginfo() function
>> that test only needs to check for debuginfo, and not specifically
>> line number. Update skip_if_no_debuginfo to use simple "perf probe"
>> check if test only needs to check for debuginfo. And for other
>> tests which rely on line number, use add_probe_vfs_getname()
>> 
>> With the change, verified that only three which required debuginfo only
>> is skipped and others ran successfully. Also tested with debuginfo
>> to make sure tests are not skipped.
>> 
>> Reported-by: Tejas Manhas <Tejas.Manhas1@ibm.com>
>> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
> 
> Thanks for taking the time to improve the test pass rate! I'm sure you
> saw Venkat's comments, but for the change itself:
> 
> Reviewed-by: Ian Rogers <irogers@google.com>
> 
> Thanks,
> Ian

Thanks Ian for the review. 
Sure, I will address Venkat’s comments along with your Reviewed-by in V2

Thanks
Athira
> 
>> ---
>> .../tests/shell/base_probe/test_adding_kernel.sh  | 15 ++++++++++++++-
>> tools/perf/tests/shell/lib/probe_vfs_getname.sh   | 13 ++++++++++++-
>> 2 files changed, 26 insertions(+), 2 deletions(-)
>> 
>> diff --git a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh b/tools/perf/tests/shell/base_probe/test_adding_kernel.sh
>> index 555a825d55f2..f3db125c8669 100755
>> --- a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh
>> +++ b/tools/perf/tests/shell/base_probe/test_adding_kernel.sh
>> @@ -23,10 +23,23 @@ TEST_RESULT=0
>> . "$DIR_PATH/../lib/probe_vfs_getname.sh"
>> 
>> TEST_PROBE=${TEST_PROBE:-"inode_permission"}
>> +PROBE_NO_LINE_CHECK=1
>> 
>> # set NO_DEBUGINFO to skip testcase if debuginfo is not present
>> # skip_if_no_debuginfo returns 2 if debuginfo is not present
>> -skip_if_no_debuginfo
>> +#
>> +# The perf probe checks which depends on presence of debuginfo and
>> +# used in this testcase are:
>> +# 1. probe add for inode_permission
>> +# 2. probe max-probes option using 'vfs_* $params'
>> +# 3. non-existing variable probing
>> +#
>> +# For these tests, probe check for specific line is not
>> +# required ( add_probe_vfs_getname does that ). So call
>> +# skip_if_no_debuginfo with argument as 1. This is to convey
>> +# that test only needs to check for debuginfo, and not specifically
>> +# line number
>> +skip_if_no_debuginfo $PROBE_NO_LINE_CHECK
>> if [ $? -eq 2 ]; then
>>        NO_DEBUGINFO=1
>> fi
>> diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
>> index 88cd0e26d5f6..8584ec76f041 100644
>> --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh
>> +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh
>> @@ -39,7 +39,18 @@ 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
>> +       no_line_check=$1
>> +       debug_str="^(Failed to find the path for the kernel|Debuginfo-analysis is not supported)|(file has no debug information)"
>> +
>> +       # search for debug_str using simple perf probe if the
>> +       # test only needs to check for debuginfo, and not specifically
>> +       # line number.
>> +       if [ $no_line_check -eq 1 ]; then
>> +               perf probe -v -L getname_flags 2>&1 | grep -E -q "$debug_str" && return 2
>> +       else
>> +               add_probe_vfs_getname -v 2>&1 | grep -E -q "$debug_str" && return 2
>> +       fi
>> +
>>        return 1
>> }
>> 
>> --
>> 2.47.3




      reply	other threads:[~2026-03-18  6:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14  8:37 [PATCH] tools/perf/tests: Update debuginfo check in skip_if_no_debuginfo Athira Rajeev
2026-03-16 11:19 ` Tejas Manhas
2026-03-17  5:32 ` Venkat Rao Bagalkote
2026-03-17 16:04 ` Ian Rogers
2026-03-18  6:17   ` Athira Rajeev [this message]

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=D8DCECF2-017F-4B09-9E95-7D5CF992B0FB@linux.ibm.com \
    --to=atrajeev@linux.ibm.com \
    --cc=Shivani.Nittor@ibm.com \
    --cc=Tanushree.Shah@ibm.com \
    --cc=Tejas.Manhas1@ibm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=jbrnak@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=tmricht@linux.ibm.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