selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
PATCH 1/1 selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
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.
--- tools/testing/selftests/ftrace/test.d/functions | 4 ++++ 1 file changed, 4 insertions(+)
tools/testing/selftests/ftrace/test.d/functions +4 -0
@@ -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
Signature · 1 line
2.23.0
Steven Rostedt
maintainerQuoted 2 lines · On Fri, 3 Apr 2020 16:29:29 +0800 Xiao Yang <[email protected]> wrote:
A lot of ftrace testcases get failure if
ftrace_enabledis disabled by default becauseftrace_enabledis a big on/off switch for the whole function tracer.
Why would it be disabled by default? Anyway, I'm thinking failure is the right answer if ftrace_enable is off.
-- Steve
Quoted 6 lines · Steven Rostedt
Quoted 2 lines · On Fri, 3 Apr 2020 16:29:29 +0800 Xiao Yang<[email protected]> wrote:
A lot of ftrace testcases get failure if
ftrace_enabledis disabled by default becauseftrace_enabledis a big on/off switch for the whole function tracer.
Hi Steve
Thanks for your quick reply.
Quoted 2 lines
Why would it be disabled by default? Anyway, I'm thinking failure is the right answer if
ftrace_enableis off.
Sorry, it seems better to say that ftrace_enabled is disabled by user.
I got 75 pass and 19 failure if ftrace_enable is off. Just have some questions:
1) Is it necessary to run all testcases if ftrace_enable is off?
2) Is is expected to get pass if ftrace_enable is off?
(I can understand that failure is expected if ftrace_enable is off)
Attach the test log:
------------------------------------------------
[root@Fedora-31 20200403-141956]# cat ftracetest.log Fri 03 Apr 2020 02:19:56 PM CST
=== Ftrace unit tests ===
[1] Basic trace file check [PASS] [2] Basic test for tracers [PASS] [3] Basic trace clock test [PASS] [4] Basic event tracing check [PASS] [5] Change the ringbuffer size [PASS] [6] Snapshot and tracing setting [PASS] [7] trace_pipe and trace_marker [PASS] [8] Test ftrace direct functions against tracers [UNRESOLVED] [9] Test ftrace direct functions against kprobes [UNRESOLVED] [10] Generic dynamic event - add/remove kprobe events [PASS]
[11] Generic dynamic event - add/remove synthetic events [PASS]
[12] Generic dynamic event - selective clear (compatibility) [PASS]
[13] Generic dynamic event - generic clear event [PASS]
[14] event tracing - enable/disable with event level files [PASS]
[15] event tracing - restricts events based on pid [PASS]
[16] event tracing - enable/disable with subsystem level files [PASS]
[17] event tracing - enable/disable with top level files [PASS]
[18] Test trace_printk from module [UNRESOLVED]
[19] ftrace - function graph filters with stack tracer [FAIL]
[20] ftrace - function graph filters [FAIL]
[21] ftrace - function trace with cpumask [PASS]
[22] ftrace - test for function event triggers [FAIL]
[23] ftrace - function glob filters [PASS]
[24] ftrace - function pid filters [FAIL]
[25] ftrace - stacktrace filter command [FAIL]
[26] ftrace - function trace on module [UNRESOLVED]
[27] ftrace - function profiler with function tracing [FAIL]
[28] ftrace - function profiling [PASS]
[29] ftrace - test reading of set_ftrace_filter [PASS]
[30] ftrace - Max stack tracer [PASS]
[31] ftrace - test for function traceon/off triggers [FAIL]
[32] ftrace - test tracing error log support [PASS]
[33] Test creation and deletion of trace instances while setting an event [PASS]
[34] Test creation and deletion of trace instances [PASS]
[35] Kprobe dynamic event - adding and removing [PASS]
[36] Kprobe dynamic event - busy event check [PASS]
[37] Kprobe event with comm arguments [FAIL] [38] Kprobe event string type argument [FAIL] [39] Kprobe event symbol argument [FAIL] [40] Kprobe event argument syntax [PASS]
[41] Kprobe dynamic event with arguments [FAIL]
[42] Kprobes event arguments with types [FAIL]
[43] Kprobe event user-memory access [FAIL]
[44] Kprobe event auto/manual naming [PASS]
[45] Kprobe dynamic event with function tracer [FAIL] [46] Kprobe dynamic event - probing module [UNRESOLVED] [47] Create/delete multiprobe on kprobe event [PASS] [48] Kprobe event parser error log check [PASS] [49] Kretprobe dynamic event with arguments [FAIL] [50] Kretprobe dynamic event with maxactive [PASS] [51] Register/unregister many kprobe events [PASS]
[52] Kprobe events - probe points [PASS]
[53] Kprobe dynamic event - adding and removing [PASS]
[54] Uprobe event parser error log check [PASS]
[55] test for the preemptirqsoff tracer [UNSUPPORTED]
[56] Meta-selftest [UNRESOLVED]
[57] Test wakeup RT tracer [PASS]
[58] Test wakeup tracer [PASS]
[59] event trigger - test inter-event histogram trigger expected fail actions [XFAIL]
[60] event trigger - test field variable support [PASS]
[61] event trigger - test inter-event combined histogram trigger [PASS]
[62] event trigger - test multiple actions on hist trigger [PASS]
[63] event trigger - test inter-event histogram trigger onchange action [PASS]
[64] event trigger - test inter-event histogram trigger onmatch action [PASS]
[65] event trigger - test inter-event histogram trigger onmatch-onmax action [PASS]
[66] event trigger - test inter-event histogram trigger onmax action [PASS]
[67] event trigger - test inter-event histogram trigger snapshot action [PASS]
[68] event trigger - test synthetic event create remove [PASS]
[69] event trigger - test synthetic_events syntax parser [PASS]
[70] event trigger - test inter-event histogram trigger trace action [PASS]
[71] event trigger - test event enable/disable trigger [PASS]
[72] event trigger - test trigger filter [PASS]
[73] event trigger - test histogram modifiers [PASS]
[74] event trigger - test histogram parser errors [PASS]
[75] event trigger - test histogram trigger [PASS]
[76] event trigger - test multiple histogram triggers [PASS]
[77] event trigger - test snapshot-trigger [PASS]
[78] event trigger - test stacktrace-trigger [PASS]
[79] trace_marker trigger - test histogram trigger [PASS]
[80] trace_marker trigger - test snapshot trigger [PASS]
[81] trace_marker trigger - test histogram with synthetic event against kernel event [PASS]
[82] trace_marker trigger - test histogram with synthetic event [PASS]
[83] event trigger - test traceon/off trigger [PASS]
[84] (instance) Basic test for tracers [PASS] [85] (instance) Basic trace clock test [PASS] [86] (instance) Change the ringbuffer size [PASS] [87] (instance) Snapshot and tracing setting [PASS] [88] (instance) trace_pipe and trace_marker [PASS] [89] (instance) event tracing - enable/disable with event level files [PASS] [90] (instance) event tracing - restricts events based on pid [PASS] [91] (instance) event tracing - enable/disable with subsystem level files [PASS] [92] (instance) ftrace - test for function event triggers [FAIL] [93] (instance) ftrace - function pid filters [FAIL] [94] (instance) ftrace - stacktrace filter command [FAIL] [95] (instance) ftrace - test for function traceon/off triggers [FAIL] [96] (instance) event trigger - test event enable/disable trigger [PASS] [97] (instance) event trigger - test trigger filter [PASS] [98] (instance) event trigger - test histogram modifiers [PASS] [99] (instance) event trigger - test histogram trigger [PASS] [100] (instance) event trigger - test multiple histogram triggers [PASS] [101] (instance) trace_marker trigger - test histogram trigger [PASS] [102] (instance) trace_marker trigger - test snapshot trigger [PASS]
# of passed: 75 # of failed: 19 # of unresolved: 6 # of untested: 0 # of unsupported: 1 # of xfailed: 1 # of undefined(test bug): 0 ------------------------------------------------
Thanks,
Xiao Yang
Quoted 6 lines
-- Steve
.
Steven Rostedt
maintainerQuoted 4 lines · On Fri, 3 Apr 2020 23:01:41 +0800 Xiao Yang <[email protected]> wrote:
Quoted 2 lines
Why would it be disabled by default? Anyway, I'm thinking failure is the right answer if
ftrace_enableis off.Sorry, it seems better to say that
ftrace_enabledis disabled by user.
But then why would you run the tests after disabling it?
Quoted 7 lines
I got 75 pass and 19 failure if
ftrace_enableis off. Just have some questions:1) Is it necessary to run all testcases if
ftrace_enableis off?
2) Is is expected to get pass ifftrace_enableis off?
(I can understand that failure is expected ifftrace_enableis off)
Because its a way to test the tests!
-- Steve
Quoted 5 lines · Steven Rostedt
Quoted 4 lines
Quoted 4 lines
Why would it be disabled by default? Anyway, I'm thinking failure is the
Quoted 1 line
Quoted 1 line
right answer if
ftrace_enableis off.Sorry, it seems better to say that
ftrace_enabledis disabled by user.But then why would you run the tests after disabling it?
Hi Steven,
I disabled it accidentally.
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
I got 75 pass and 19 failure if
ftrace_enableis off. Just have some questions:1) Is it necessary to run all testcases if
ftrace_enableis off?
2) Is is expected to get pass ifftrace_enableis off?
(I can understand that failure is expected ifftrace_enableis off)Because its a way to test the tests!
I think that all tests depend on ftrace_enabled and running them should report "not supported" or enable it automatically when it is disabled.
Thanks,
Xiao Yang
Steven Rostedt
maintainerQuoted 7 lines · On Fri, 3 Apr 2020 23:36:39 +0800 Xiao Yang <[email protected]> wrote:
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
1) Is it necessary to run all testcases if
ftrace_enableis off?
2) Is is expected to get pass ifftrace_enableis off?
(I can understand that failure is expected ifftrace_enableis off)Because its a way to test the tests!
I think that all tests depend on
ftrace_enabledand running them should report "not supported" or enable it automatically when it is disabled.
As I'm considering just removing ftrace_enable, I'm going to keep the tests as is.
Thanks,
-- Steve
Quoted 2 lines · Steven Rostedt
As I'm considering just removing
ftrace_enable, I'm going to keep the tests as is.
Hi Steven,
Thanks for your explanation.
It is reasonable for me to keep the tests.
Thanks,
Xiao Yang