* [PATCH] selftests/ftrace: Check for dynamic_events before clearing
@ 2026-10-16 3:26 Jaewon Jung
0 siblings, 0 replies; only message in thread
From: Jaewon Jung @ 2026-10-16 3:26 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Shuah Khan
Cc: linux-kernel, linux-trace-kernel, linux-kselftest
Trace instances do not have a dynamic_events file, but
clear_dynamic_events() is called during initialization. Check for the
file to avoid a "No such file or directory" error.
Signed-off-by: Jaewon Jung <jaewon8868@gmail.com>
---
tools/testing/selftests/ftrace/test.d/functions | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index 826141e299e5..4f2abb05e365 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -84,6 +84,8 @@ clear_synthetic_events() { # reset all current synthetic events
}
clear_dynamic_events() { # reset all current dynamic events
+ [ -f dynamic_events ] || return 0
+
again=1
stop=1
# loop mulitple times as some events require other to be removed first
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 3:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 3:26 [PATCH] selftests/ftrace: Check for dynamic_events before clearing Jaewon Jung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox