ftrace/selftest: Test if set_event/ftrace_pid exists before writing
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 3 Jul 2019 19:46:08 +0000 (15:46 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 16 Jul 2019 19:14:48 +0000 (15:14 -0400)
commit6e55f320f00e4db7144a4906dd8ac53701891e31
tree05c25a134fad86dd722bc3385842c5c59a838ba0
parentcbd965bde74c3d0e53798404fd4b9829a68ccec8
ftrace/selftest: Test if set_event/ftrace_pid exists before writing

While testing on a very old kernel (3.5), the tests failed because the write
to set_event_pid in the setup code, did not exist. The tests themselves
could pass, but the setup failed causing an error.

Other files test for existance before writing to them. Do the same for
set_event_pid and set_ftrace_pid.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/functions