mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH 1/2] ftrace/selftests: Fix regex pattern to match vmlinux symbol names only
Date: Tue, 25 Aug 2026 18:58:39 +0200	[thread overview]
Message-ID: <24e1b434124b2ae34482f4eed1f6bc51fa73419a.1787670777.git.agordeev@linux.ibm.com> (raw)
In-Reply-To: <cover.1787670777.git.agordeev@linux.ibm.com>

Commit 1870ddcd94b0 ("bpf: Prefer vmlinux symbols over module symbols
for unqualified kprobes") changed unqualified kprobe lookup to prefer
a unique vmlinux symbol even when modules export symbols with the same
name.

Reflect this change in the test and anchor the grep pattern at the end
of the line so it only counts vmlinux symbols and skips module ones.

Suggested-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
---
 .../selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
index bc9514428dba..07b1177c1634 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
@@ -6,7 +6,7 @@
 SYMBOL='name_show'
 
 # We skip this test on kernel where SYMBOL is unique or does not exist.
-if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then
+if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}$" /proc/kallsyms)" -le '1' ]; then
 	exit_unsupported
 fi
 
-- 
2.53.0


  reply	other threads:[~2026-08-25 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 16:58 [PATCH 0/2] ftrace/selftests: Fix registering kprobe on non-unique symbol Alexander Gordeev
2026-08-25 16:58 ` Alexander Gordeev [this message]
2026-08-25 16:58 ` [PATCH 2/2] ftrace/selftests: Change non-unique test symbol to init_once Alexander Gordeev
2026-10-13  4:10   ` Masami Hiramatsu
2026-09-08 12:46 ` [PATCH 0/2] ftrace/selftests: Fix registering kprobe on non-unique symbol Alexander Gordeev

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=24e1b434124b2ae34482f4eed1f6bc51fa73419a.1787670777.git.agordeev@linux.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®