]> Gentwo Git Trees - linux/.git/commit
selftests/tracing: Run sample events to clear page cache events
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 28 Oct 2025 16:27:24 +0000 (12:27 -0400)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 11 Nov 2025 01:00:07 +0000 (18:00 -0700)
commitdd4adb986a86727ed8f56c48b6d0695f1e211e65
tree8d93beb6ef6642d98e62e6d293361ddfb1575417
parent920aa3a7705a061cb3004572d8b7932b54463dbf
selftests/tracing: Run sample events to clear page cache events

The tracing selftest "event-filter-function.tc" was failing because it
first runs the "sample_events" function that triggers the kmem_cache_free
event and it looks at what function was used during a call to "ls".

But the first time it calls this, it could trigger events that are used to
pull pages into the page cache.

The rest of the test uses the function it finds during that call to see if
it will be called in subsequent "sample_events" calls. But if there's no
need to pull pages into the page cache, it will not trigger that function
and the test will fail.

Call the "sample_events" twice to trigger all the page cache work before
it calls it to find a function to use in subsequent checks.

Cc: stable@vger.kernel.org
Fixes: eb50d0f250e96 ("selftests/ftrace: Choose target function for filter test from samples")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/filter/event-filter-function.tc