mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
selftests/ftrace: Add new test case which checks non unique symbol
If name_show() is non unique, this test will try to install a kprobe on this function which should fail returning EADDRNOTAVAIL. On kernel where name_show() is not unique, this test is skipped. Link: https://lore.kernel.org/all/[email protected]/ Cc: [email protected] Signed-off-by: Francis Laniel <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
This commit is contained in:
committed by
Masami Hiramatsu (Google)
parent
b022f0c7e4
commit
03b80ff802
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# description: Test failure of registering kprobe on non unique symbol
|
||||
# requires: kprobe_events
|
||||
|
||||
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
|
||||
exit_unsupported
|
||||
fi
|
||||
|
||||
! echo "p:test_non_unique ${SYMBOL}" > kprobe_events
|
||||
Reference in New Issue
Block a user