linux/tools/testing/selftests/ftrace/test.d
Steven Rostedt dd4adb986a 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: eb50d0f250 ("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>
2025-11-10 18:00:07 -07:00
..
00basic selftests/ftrace: Fix to use remount when testing mount GID option 2025-01-14 17:06:32 -07:00
direct selftests/ftrace: Convert required interface checks into requires list 2020-06-16 10:39:20 -06:00
dynevent selftests: tracing: Enable fprobe events before checking enable_functions 2025-07-02 09:45:21 +09:00
event selftests/tracing: Fix false failure of subsystem event test 2025-07-24 15:52:20 -06:00
filter selftests/tracing: Run sample events to clear page cache events 2025-11-10 18:00:07 -07:00
ftrace selftests: tracing: Use mutex_unlock for testing glob filter 2025-07-07 15:34:10 -06:00
instances selftests/ftrace: Correctly enable event in instance-event.tc 2023-09-05 16:41:28 -06:00
kprobe selftests/ftrace: adjust offset for kprobe syntax error test 2024-12-11 10:08:04 -07:00
preemptirq selftests: ftrace: Use "grep -E" instead of "egrep" 2022-11-25 10:57:32 -07:00
selftest selftests/ftrace: Add checkbashisms meta-testcase 2019-05-24 13:38:29 -06:00
tracer selftests/ftrace: Convert tracer tests to use 'requires' to specify program dependency 2022-10-28 02:01:17 -06:00
trigger selftests/tracing: Allow some more tests to run in instances 2025-02-20 13:15:14 -07:00
functions selftests/tracing: Test only toplevel README file not the instances 2025-02-20 13:15:01 -07:00
template selftests/ftrace: Support ":README" suffix for requires 2020-06-16 10:42:47 -06:00