selftests/ftrace: Add new test case which checks non unique symbol
authorFrancis Laniel <flaniel@linux.microsoft.com>
Fri, 20 Oct 2023 10:42:50 +0000 (13:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:15 +0000 (12:03 +0200)
commit7241c2627c14002acb2f95388b29a79c1265e075
tree4af547349d062514dae11e1ccd2e5e417e70f1e3
parent324c31b0e0d72635dd8e3e0598ff6fac9f3f35c1
selftests/ftrace: Add new test case which checks non unique symbol

commit 03b80ff8023adae6780e491f66e932df8165e3a0 upstream.

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/20231020104250.9537-3-flaniel@linux.microsoft.com/
Cc: stable@vger.kernel.org
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc [new file with mode: 0644]