tracing/selftest: Add test to better test subops filtering of function graph
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 9 Apr 2025 15:15:51 +0000 (11:15 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 11 Apr 2025 20:02:08 +0000 (16:02 -0400)
commita1fc89d409d8fd927622c238b7c7d719e9ecab3d
treee47619cfd4c78da32902c0b315f81e901f0f56fc
parent0ae6b8ce200da00a78f33c055fdc4fe3225d22ec
tracing/selftest: Add test to better test subops filtering of function graph

A bug was discovered that showed the accounting of the subops of the
ftrace_ops filtering was incorrect. Add a new test to better test the
filtering.

This test creates two instances, where it will add various filters to both
the set_ftrace_filter and the set_ftrace_notrace files and enable
function_graph. Then it looks into the enabled_functions file to make sure
that the filters are behaving correctly.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Andy Chiu <andybnac@gmail.com>
Link: https://lore.kernel.org/20250409152720.380778379@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-multi-filter.tc [new file with mode: 0644]