All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/ftrace: Fix unique symbol check in kprobe_non_uniq_symbol.tc
Date: Thu, 10 Sep 2026 08:41:30 +0900	[thread overview]
Message-ID: <20260910084130.c19c45e1d4582835979aa241@kernel.org> (raw)
In-Reply-To: <20260909092954.2200558-1-svens@linux.ibm.com>

On Wed,  9 Sep 2026 11:29:53 +0200
Sven Schnelle <svens@linux.ibm.com> wrote:

> The current regex also matches symbols in modules, which makes the
> test fail on s390 where name_show is present only once in the kernel,
> but also multiple times in modules:
> 
> 000001b1401cdc20 t name_show
> 000001b0c05e6c40 t name_show    [mdev]
> 000001b0c0495f30 t name_show    [i2c_core]
> 
> Fix this by changing the regular expression to only match the function
> name.

Ah, nice catch! I'll add this fixes tag.

Fixes: 03b80ff8023a ("selftests/ftrace: Add new test case which checks non unique symbol")

Thanks,

> 
> Signed-off-by: Sven Schnelle <svens@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
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

      parent reply	other threads:[~2026-09-09 23:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  9:29 [PATCH] selftests/ftrace: Fix unique symbol check in kprobe_non_uniq_symbol.tc Sven Schnelle
2026-09-09 17:41 ` Steven Rostedt
2026-09-10  0:01   ` Masami Hiramatsu
2026-09-09 23:41 ` Masami Hiramatsu [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=20260910084130.c19c45e1d4582835979aa241@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=svens@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 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.