aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2019-11-08 16:08:12 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-11-13 09:36:49 -0500
commited9dafebce52206382de96bd5bbdff22335930f6 (patch)
tree96a0307764cb05ee33237b5b6a9143dce0eb0eaa /tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
parentftrace: Add another example of register_ftrace_direct() use case (diff)
downloadwireguard-linux-ed9dafebce52206382de96bd5bbdff22335930f6.tar.xz
wireguard-linux-ed9dafebce52206382de96bd5bbdff22335930f6.zip
ftrace/selftests: Update the direct call selftests to test two direct calls
The register_ftrace_direct() takes a different path if there's already a direct call registered, but this was not tested in the self tests. Now that there's a second direct caller test module, we can use this to test not only one direct caller, but two. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc')
-rw-r--r--tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
index 8b8ed3cad51b..cbc7a30c2e0f 100644
--- a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
+++ b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
@@ -51,3 +51,19 @@ done
echo nop > current_tracer
rmmod ftrace-direct ||:
+
+# Now do the same thing with another direct function registered
+echo "Running with another ftrace direct function"
+
+rmmod ftrace-direct-too ||:
+modprobe ftrace-direct-too
+
+for t in `cat available_tracers`; do
+ if [ "$t" != "nop" ]; then
+ test_tracer $t
+ fi
+done
+
+echo nop > current_tracer
+rmmod ftrace-direct ||:
+rmmod ftrace-direct-too ||: