* [PATCH] ftracetest: Cope properly with stack tracer not being enabled
@ 2015-03-30 5:21 Michael Ellerman
2015-03-30 21:36 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2015-03-30 5:21 UTC (permalink / raw)
To: shuahkh; +Cc: rostedt, linux-kernel, davej, namhyung
If the stack tracer (CONFIG_STACK_TRACER) is disabled, the
fgraph-filter-stack test blows chunks:
[8] ftrace - function graph filters with stack tracer [FAIL]
+ reset_tracer
+ echo nop
./ftracetest: 19: /home/michael/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc:
cannot create /proc/sys/kernel/stack_tracer_enabled: Directory nonexistent
Fix it by checking if the proc file exists before echoing to it. With
the patch applied it fails correctly with:
[8] ftrace - function graph filters with stack tracer [UNSUPPORTED]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
index c15e018e0220..3b1cf20cf6d8 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
@@ -16,7 +16,9 @@ fi
do_reset() {
reset_tracer
- echo 0 > /proc/sys/kernel/stack_tracer_enabled
+ if [ -e /proc/sys/kernel/stack_tracer_enabled ]; then
+ echo 0 > /proc/sys/kernel/stack_tracer_enabled
+ fi
enable_tracing
clear_trace
echo > set_ftrace_filter
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ftracetest: Cope properly with stack tracer not being enabled
2015-03-30 5:21 [PATCH] ftracetest: Cope properly with stack tracer not being enabled Michael Ellerman
@ 2015-03-30 21:36 ` Steven Rostedt
2015-03-31 16:17 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2015-03-30 21:36 UTC (permalink / raw)
To: Michael Ellerman; +Cc: shuahkh, linux-kernel, davej, namhyung
On Mon, 30 Mar 2015 16:21:40 +1100
Michael Ellerman <mpe@ellerman.id.au> wrote:
> If the stack tracer (CONFIG_STACK_TRACER) is disabled, the
> fgraph-filter-stack test blows chunks:
>
> [8] ftrace - function graph filters with stack tracer [FAIL]
> + reset_tracer
> + echo nop
> ./ftracetest: 19: /home/michael/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc:
> cannot create /proc/sys/kernel/stack_tracer_enabled: Directory nonexistent
>
> Fix it by checking if the proc file exists before echoing to it. With
> the patch applied it fails correctly with:
>
> [8] ftrace - function graph filters with stack tracer [UNSUPPORTED]
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
Acked-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftracetest: Cope properly with stack tracer not being enabled
2015-03-30 21:36 ` Steven Rostedt
@ 2015-03-31 16:17 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2015-03-31 16:17 UTC (permalink / raw)
To: Steven Rostedt, Michael Ellerman; +Cc: linux-kernel, davej, namhyung
On 03/30/2015 03:36 PM, Steven Rostedt wrote:
> On Mon, 30 Mar 2015 16:21:40 +1100
> Michael Ellerman <mpe@ellerman.id.au> wrote:
>
>> If the stack tracer (CONFIG_STACK_TRACER) is disabled, the
>> fgraph-filter-stack test blows chunks:
>>
>> [8] ftrace - function graph filters with stack tracer [FAIL]
>> + reset_tracer
>> + echo nop
>> ./ftracetest: 19: /home/michael/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc:
>> cannot create /proc/sys/kernel/stack_tracer_enabled: Directory nonexistent
>>
>> Fix it by checking if the proc file exists before echoing to it. With
>> the patch applied it fails correctly with:
>>
>> [8] ftrace - function graph filters with stack tracer [UNSUPPORTED]
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> ---
>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>
Applied to linux-kselftest next for 4.1
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-31 16:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 5:21 [PATCH] ftracetest: Cope properly with stack tracer not being enabled Michael Ellerman
2015-03-30 21:36 ` Steven Rostedt
2015-03-31 16:17 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox