* [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
@ 2020-04-03 8:29 Xiao Yang
2020-04-03 13:22 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Xiao Yang @ 2020-04-03 8:29 UTC (permalink / raw)
To: rostedt, mingo; +Cc: shuah, ice_yangxiao, linux-kselftest, Xiao Yang
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@cn.fujitsu.com>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 8:29 [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases Xiao Yang
@ 2020-04-03 13:22 ` Steven Rostedt
2020-04-03 15:01 ` Xiao Yang
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2020-04-03 13:22 UTC (permalink / raw)
To: Xiao Yang; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On Fri, 3 Apr 2020 16:29:29 +0800
Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:
> 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.
Why would it be disabled by default? Anyway, I'm thinking failure is the
right answer if ftrace_enable is off.
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 13:22 ` Steven Rostedt
@ 2020-04-03 15:01 ` Xiao Yang
2020-04-03 15:15 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Xiao Yang @ 2020-04-03 15:01 UTC (permalink / raw)
To: Steven Rostedt; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On 2020/4/3 21:22, Steven Rostedt wrote:
> On Fri, 3 Apr 2020 16:29:29 +0800
> Xiao Yang<yangx.jy@cn.fujitsu.com> wrote:
>
>> 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.
>
Hi Steve
Thanks for your quick reply.
> Why would it be disabled by default? Anyway, I'm thinking failure is the
> right answer if ftrace_enable is 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
>
> -- Steve
>
>
> .
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 15:01 ` Xiao Yang
@ 2020-04-03 15:15 ` Steven Rostedt
2020-04-03 15:36 ` Xiao Yang
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2020-04-03 15:15 UTC (permalink / raw)
To: Xiao Yang; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On Fri, 3 Apr 2020 23:01:41 +0800
Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:
> > Why would it be disabled by default? Anyway, I'm thinking failure is the
> > right answer if ftrace_enable is off.
>
> Sorry, it seems better to say that ftrace_enabled is disabled by user.
But then why would you run the tests after disabling it?
>
> 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)
Because its a way to test the tests!
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 15:15 ` Steven Rostedt
@ 2020-04-03 15:36 ` Xiao Yang
2020-04-03 16:31 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Xiao Yang @ 2020-04-03 15:36 UTC (permalink / raw)
To: Steven Rostedt; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On 2020/4/3 23:15, Steven Rostedt wrote:
>>> Why would it be disabled by default? Anyway, I'm thinking failure is the
>>> > > right answer if ftrace_enable is off.
>> >
>> > Sorry, it seems better to say that ftrace_enabled is disabled by user.
> But then why would you run the tests after disabling it?
Hi Steven,
I disabled it accidentally.
>
>> >
>> > 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)
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 15:36 ` Xiao Yang
@ 2020-04-03 16:31 ` Steven Rostedt
2020-04-04 0:41 ` Xiao Yang
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2020-04-03 16:31 UTC (permalink / raw)
To: Xiao Yang; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On Fri, 3 Apr 2020 23:36:39 +0800
Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:
> >> > 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)
> > 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.
As I'm considering just removing ftrace_enable, I'm going to keep the tests
as is.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases
2020-04-03 16:31 ` Steven Rostedt
@ 2020-04-04 0:41 ` Xiao Yang
0 siblings, 0 replies; 7+ messages in thread
From: Xiao Yang @ 2020-04-04 0:41 UTC (permalink / raw)
To: Steven Rostedt; +Cc: mingo, shuah, ice_yangxiao, linux-kselftest
On 2020/4/4 0:31, Steven Rostedt wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-04 0:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 8:29 [PATCH] selftests/ftrace: Always enable ftrace_enabled for ftrace testcases Xiao Yang
2020-04-03 13:22 ` Steven Rostedt
2020-04-03 15:01 ` Xiao Yang
2020-04-03 15:15 ` Steven Rostedt
2020-04-03 15:36 ` Xiao Yang
2020-04-03 16:31 ` Steven Rostedt
2020-04-04 0:41 ` Xiao Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.