diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-10-26 16:20:32 -0400 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-10-27 16:44:18 -0600 |
commit | dc6bf4da825aa0301a46f55fec7c0bb706af2aad (patch) | |
tree | 068cec908d1dcd50902c367041f5c1ab0dd76198 /tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc | |
parent | 3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff) |
selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function
Commit cad6967ac108 ("fork: introduce kernel_clone()") replaced "_do_fork()"
with "kernel_clone()". The ftrace selftests reference the fork function in
several of the tests. The rename will make the tests break, but if those
names are changed in the tests, they would then break on older kernels. The
same set of tests should pass older kernels if they have previously passed.
Obviously, a new test may not work on older kernels if the test was added
due to a bug or a new feature.
The setup of ftracetest will now create a $FUNCTION_FORK bash variable
that will contain "_do_fork" for older kernels and "kernel_clone" for newer
ones. It figures out the proper name by examining /proc/kallsyms.
Note, available_filter_functions could also be used, but because some tests
should be able to pass without function tracing enabled, it could not be
used.
Fixes: eea11285dab3 ("tracing: switch to kernel_clone()")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc index 45d90b6c763d..f0d5b7777ed7 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc @@ -4,7 +4,7 @@ # requires: kprobe_events "Create/append/":README # Choose 2 symbols for target -SYM1=kernel_clone +SYM1=$FUNCTION_FORK SYM2=do_exit EVENT_NAME=kprobes/testevent |