Message ID | 157475726452.3389.3778488615487716476.stgit@devnote2 (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | selftests/ftrace: Fix ftracetest testcases for non-function tracer case | expand |
On Tue, 26 Nov 2019 17:34:24 +0900 Masami Hiramatsu <mhiramat@kernel.org> wrote: > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc > @@ -15,6 +15,11 @@ if [ $NP -eq 1 ] ;then > exit_unresolved > fi > > +if ! grep -q function available_tracers ; then > + echo "Function trace is not enabled" > + exit_unsupported > +fi > + > ORIG_CPUMASK=`cat tracing_cpumask` Strange, but the bashism test failed: ++ checkbashisms /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc possible bashism in /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc line 18 ('function' is useless): if ! grep -q function available_tracers ; then Not sure why it did not like that line. Maybe my bashism check got confused by the key word "function"? Yep! By adding quotes around "function" it doesn't complain: if ! grep -q "function" available_tracers ; then May need to add that. -- Steve
On Tue, 26 Nov 2019 12:49:01 -0500 Steven Rostedt <rostedt@goodmis.org> wrote: > On Tue, 26 Nov 2019 17:34:24 +0900 > Masami Hiramatsu <mhiramat@kernel.org> wrote: > > > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc > > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc > > @@ -15,6 +15,11 @@ if [ $NP -eq 1 ] ;then > > exit_unresolved > > fi > > > > +if ! grep -q function available_tracers ; then > > + echo "Function trace is not enabled" > > + exit_unsupported > > +fi > > + > > ORIG_CPUMASK=`cat tracing_cpumask` > > Strange, but the bashism test failed: > > ++ checkbashisms /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc > possible bashism in /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc line 18 ('function' is useless): > if ! grep -q function available_tracers ; then > > Not sure why it did not like that line. Maybe my bashism check got > confused by the key word "function"? > > Yep! > > By adding quotes around "function" it doesn't complain: > > if ! grep -q "function" available_tracers ; then > > May need to add that. Thanks! Shuah, can I update this patch? I'll send it asap. Thank you,
On 11/26/19 4:31 PM, Masami Hiramatsu wrote: > On Tue, 26 Nov 2019 12:49:01 -0500 > Steven Rostedt <rostedt@goodmis.org> wrote: > >> On Tue, 26 Nov 2019 17:34:24 +0900 >> Masami Hiramatsu <mhiramat@kernel.org> wrote: >> >>> --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc >>> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc >>> @@ -15,6 +15,11 @@ if [ $NP -eq 1 ] ;then >>> exit_unresolved >>> fi >>> >>> +if ! grep -q function available_tracers ; then >>> + echo "Function trace is not enabled" >>> + exit_unsupported >>> +fi >>> + >>> ORIG_CPUMASK=`cat tracing_cpumask` >> >> Strange, but the bashism test failed: >> >> ++ checkbashisms /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc >> possible bashism in /work/git-local/linux.git/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc line 18 ('function' is useless): >> if ! grep -q function available_tracers ; then >> >> Not sure why it did not like that line. Maybe my bashism check got >> confused by the key word "function"? >> >> Yep! >> >> By adding quotes around "function" it doesn't complain: >> >> if ! grep -q "function" available_tracers ; then >> >> May need to add that. > > Thanks! Shuah, can I update this patch? > I'll send it asap. > > Thank you, > No worries. Take your time. I won't pull in until things settle down. I noticed Steve gave you review comments. thanks, -- Shuah
On Tue, 26 Nov 2019 16:50:54 -0700 shuah <shuah@kernel.org> wrote: > No worries. Take your time. I won't pull in until things settle down. > I noticed Steve gave you review comments. Masami's last patch should be good to go. Thanks Shuah, -- Steve
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc index 36fb59f886ea..1a52f2883fe0 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc @@ -3,6 +3,8 @@ # description: ftrace - stacktrace filter command # flags: instance +[ ! -f set_ftrace_filter ] && exit_unsupported + echo _do_fork:stacktrace >> set_ftrace_filter grep -q "_do_fork:stacktrace:unlimited" set_ftrace_filter diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc index 86a1f07ef2ca..7757b549f0b6 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc @@ -15,6 +15,11 @@ if [ $NP -eq 1 ] ;then exit_unresolved fi +if ! grep -q function available_tracers ; then + echo "Function trace is not enabled" + exit_unsupported +fi + ORIG_CPUMASK=`cat tracing_cpumask` do_reset() {