mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
tracing/selftests: Fix false bashism in kprobe_non_uniq_symbol.tc
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.
Link: https://lore.kernel.org/r/20261029211218.3749963a@fedora
Cc: [email protected]
Fixes: d22c3e0088 ("selftests/ftrace: Fix unique symbol check in kprobe_non_uniq_symbol.tc")
Signed-off-by: Steven Rostedt <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
This commit is contained in:
committed by
Shuah Khan
parent
27698b545c
commit
88d5f8cb8a
@@ -6,7 +6,7 @@
|
||||
SYMBOL='init_once'
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user