[PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux