[PATCH 2/5] selftests: ftrace: Fix test cases to enable tracing

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

 



Fix some test cases to enable tracing before starting
trace test. This can avoid false-positive failure when
previous testcase fails while disabling tracing.

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
 .../selftests/ftrace/test.d/event/event-enable.tc  |    1 +
 .../selftests/ftrace/test.d/event/event-pid.tc     |    1 +
 .../ftrace/test.d/event/subsystem-enable.tc        |    1 +
 .../ftrace/test.d/event/toplevel-enable.tc         |    1 +
 .../ftrace/test.d/ftrace/func_profiler.tc          |    1 +
 .../ftrace/test.d/kprobe/kprobe_ftrace.tc          |    1 +
 6 files changed, 6 insertions(+)

diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
index 87eb9d6..ee7ea0a 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
@@ -23,6 +23,7 @@ fi
 
 reset_tracer
 do_reset
+enable_tracing
 
 echo 'sched:sched_switch' > set_event
 
diff --git a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
index d4ab27b..1477e5e 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-pid.tc
@@ -30,6 +30,7 @@ fi
 
 reset_tracer
 do_reset
+enable_tracing
 
 echo 1 > events/sched/sched_switch/enable
 
diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
index ced27ef..f4a64f9 100644
--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
@@ -23,6 +23,7 @@ fi
 
 reset_tracer
 do_reset
+enable_tracing
 
 echo 'sched:*' > set_event
 
diff --git a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
index 0bb5df3..037a82e 100644
--- a/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
@@ -23,6 +23,7 @@ fi
 
 reset_tracer
 do_reset
+enable_tracing
 
 echo '*:*' > set_event
 
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
index 7808336..d10d6e0 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
@@ -36,6 +36,7 @@ fail() { # mesg
 
 echo "Testing function tracer with profiler:"
 echo "enable function tracer"
+enable_tracing
 echo function > current_tracer
 echo "enable profiler"
 echo 1 > function_profile_enabled
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
index d6f2f49..bdbd385 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
@@ -10,6 +10,7 @@ echo _do_fork > set_ftrace_filter
 echo 0 > events/enable
 echo > kprobe_events
 echo 'p:testprobe _do_fork' > kprobe_events
+enable_tracing
 
 # kprobe on / ftrace off
 echo 1 > events/kprobes/testprobe/enable

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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