Re: [PATCH] tracing/selftests: Fix false bashism in kprobe_non_uniq_symbol.tc

From
Shuah Khan <skhan@linuxfoundation.org>
Date
2026-11-05 21:22:06
Also in
linux-kselftest, lkml
Reply to
Masami Hiramatsu (Google), 2026-11-03
On 11/2/26 17:19, Masami Hiramatsu (Google) wrote:
On Thu, 29 Oct 2026 21:12:18 -0400, Steven Rostedt [off-list ref] wrote:
quoted
From: Steven Rostedt <rostedt@goodmis.org>

The checkbashism is giving a false positive to the kprobe test of:

   ($"foo" should be eval_gettext "foo"):
   if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}$" /proc/kallsyms)" -le '1' ]; then

This is because it sees the $" at the end of the grep as a bash symbol.
Instead, escape the '$' with a backslash as it is within quotes and that
'$' is for grep to process an end of line character and not a bash
variable.

Cc: <redacted>
Fixes: d22c3e0088e85 ("selftests/ftrace: Fix unique symbol check in kprobe_non_uniq_symbol.tc")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Oops, good catch!

Looks good to me.

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

Shuah, can you pick this?
Applied to kselftest fixes branch for next rc

thanks,
-- Shuah
Thread (3 messages) 3 messages, 3 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help