[PATCH] selftests/ftrace: Stop tracing while reading the trace file by default

From: Masami Hiramatsu
Date: Tue Oct 19 2021 - 22:50:35 EST


Stop tracing while reading the trace file by default, to prevent
the test results while checking it and to avoid taking a long time
to check the result.
If there is any testcase which wants to test the tracing while reading
the trace file, please override this setting inside the test case.

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
tools/testing/selftests/ftrace/test.d/functions | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index 000fd05e84b1..8adc0140d03f 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -124,6 +124,12 @@ initialize_ftrace() { # Reset ftrace to initial-state
[ -f uprobe_events ] && echo > uprobe_events
[ -f synthetic_events ] && echo > synthetic_events
[ -f snapshot ] && echo 0 > snapshot
+
+# Stop tracing while reading the trace file by default, to prevent
+# the test results while checking it and to avoid taking a long time
+# to check the result.
+ [ -f options/pause-on-trace ] && echo 1 > options/pause-on-trace
+
clear_trace
enable_tracing
}
--
2.25.1




--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>