linux/tools/testing/selftests/ftrace/test.d
Steven Rostedt c5c413534d selftests/tracing: Have trigger-hist-poll.tc use sched_process_exit
Currently trigger-hist-poll.tc uses sched_process_free to test the polling
of the histogram file. The way it does that is to run sleep, then execute
the poll.c code that polls on the sched_process_free for up to 4 seconds
to test that when sleep triggers the sched_process_free trace event, it
will update the histogram and wake the poll.c code up.

The issue is that sched_process_free trace event is called by
delayed_put_task_struct() which is called after a RCU grace period has
ended. If CONFIG_RCU_LAZY is enabled, RCU callbacks are batched together
and do not execute right away. This causes the delayed_put_task_struct()
to be called after the poll.c function finishes and it will report an
error that it did not wake up on the event. That's because the event
didn't trigger during its wait time.

Use sched_process_exit instead, which is called when a process exits and
doesn't depend on RCU callbacks that may be delayed.

Link: https://lore.kernel.org/r/20260708163436.058cc3df@gandalf.local.home
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2026-07-10 10:14:42 -06:00
..
00basic selftests/ftrace: Fix trace_marker_raw test on 64K page kernels 2026-06-17 17:17:26 -06:00
direct selftests/ftrace: Convert required interface checks into requires list 2020-06-16 10:39:20 -06:00
dynevent selftests/ftrace: Fix reading enabled_functions in add_remove_fprobe_module test 2026-07-10 10:14:42 -06:00
event selftests/ftrace: Test toplevel-enable for instance 2025-12-31 12:46:12 -07:00
filter selftests/tracing: Run sample events to clear page cache events 2025-11-10 18:00:07 -07:00
ftrace selftests/ftrace: traceonoff_triggers: strip off names 2025-12-31 12:45:25 -07: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
remotes tracing: selftests: Extend hotplug testing for trace remotes 2026-04-02 14:16:09 +01: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: Have trigger-hist-poll.tc use sched_process_exit 2026-07-10 10:14:42 -06:00
functions selftests/ftrace: Quote check_requires comparisons 2026-04-13 11:05:39 -06:00
template selftests/ftrace: Support ":README" suffix for requires 2020-06-16 10:42:47 -06:00