]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
selftests/ftrace: Fix to check the existence of set_ftrace_filter
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 26 Nov 2019 08:34:16 +0000 (17:34 +0900)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commita1ead735176f38bd830ebebf91625f021849ee55
tree6b531c1b4286457d31ae3aa3ebf9bc9a33a56e2a
parent0188ecb4f5d5d11d85722f055467cf7c8c10ae2b
selftests/ftrace: Fix to check the existence of set_ftrace_filter

BugLink: https://bugs.launchpad.net/bugs/1861929
[ Upstream commit fd1baf6ca2ea3550ea47f2bb0bdcf34ec764a779 ]

If we run ftracetest on the kernel with CONFIG_DYNAMIC_FTRACE=n,
there is no set_ftrace_filter and all test cases are failed, because
reset_ftrace_filter() returns an error.
Let's check whether set_ftrace_filter exists in reset_ftrace_filter()
and clean up only set_ftrace_notrace in initialize_ftrace().

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/ftrace/test.d/functions