]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace/selftest: Add tests to test register_ftrace_direct()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 8 Nov 2019 17:19:14 +0000 (12:19 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 13 Nov 2019 14:36:49 +0000 (09:36 -0500)
commit286edf4c3b0a657c60807c47ca8eaef0b80779b8
tree43ff72733bc74a70358ca823462f8979e13ed1b4
parent24d7466d0f8f3151fbec411eccd2ee87c81541ea
ftrace/selftest: Add tests to test register_ftrace_direct()

Add two test cases that test the new ftrace direct functionality if the
ftrace-direct sample module is available. One test case tests against each
available tracer (function, function_graph, mmiotrace, etc), and the other
test tests against a kprobe at the same location as the direct caller. Both
tests follow the same pattern of testing combinations:

  enable test (either the tracer or the kprobe)
  load direct function module
  unload direct function module
  disable test

  enable test
  load direct function module
  disable test
  unload direct function module

  load direct function module
  enable test
  disable test
  unload direct function module

  load direct function module
  enable test
  unload direct function module
  disable test

As most the bugs in development happened with various ways of enabling or
disabling the direct calls with function tracer in one of these
combinations.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc [new file with mode: 0644]
tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc [new file with mode: 0644]