A lot of ftrace testcases get failure if ftrace_enabled is disabled by default because ftrace_enabled is a big on/off switch for the whole function tracer. Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxxxxx> --- tools/testing/selftests/ftrace/test.d/functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions index 5d4550591ff9..54c18275bd7f 100644 --- a/tools/testing/selftests/ftrace/test.d/functions +++ b/tools/testing/selftests/ftrace/test.d/functions @@ -1,3 +1,6 @@ +enable_ftrace() { # enable function tracer + echo 1 > /proc/sys/kernel/ftrace_enabled +} clear_trace() { # reset trace output echo > trace @@ -88,6 +91,7 @@ initialize_ftrace() { # Reset ftrace to initial-state # As the initial state, ftrace will be set to nop tracer, # no events, no triggers, no filters, no function filters, # no probes, and tracing on. + enable_ftrace disable_tracing reset_tracer reset_trigger -- 2.23.0