On Sun, 02 Aug 2015 07:40:05 +0900 Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> wrote: > On 2015/07/27 18:34, Namhyung Kim wrote: > > Hi Masami, > > > > On Sat, Jul 25, 2015 at 10:13:10AM +0900, Masami Hiramatsu wrote: > >> This adds simple event trigger testcases for ftracetest, > >> which covers following triggers. > >> - traceon-traceoff trigger > >> - enable/disable_event trigger > >> - snapshot trigger > >> - stacktrace trigger > >> - trigger filters > >> > >> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> > >> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> > >> Cc: Ingo Molnar <mingo@xxxxxxxxxx> > >> Cc: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx> > >> Cc: Namhyung Kim <namhyung@xxxxxxxxxx> > >> Cc: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx> > >> --- > >> tools/testing/selftests/ftrace/test.d/functions | 9 +++ > >> .../ftrace/test.d/trigger/trigger-eventonoff.tc | 64 ++++++++++++++++++++ > >> .../ftrace/test.d/trigger/trigger-filter.tc | 59 ++++++++++++++++++ > >> .../ftrace/test.d/trigger/trigger-snapshot.tc | 56 ++++++++++++++++++ > >> .../ftrace/test.d/trigger/trigger-stacktrace.tc | 53 +++++++++++++++++ > >> .../ftrace/test.d/trigger/trigger-traceonoff.tc | 58 ++++++++++++++++++ > >> 6 files changed, 299 insertions(+) > >> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc > >> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc > >> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc > >> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc > >> create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc > >> > >> diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions > >> index 5d8cd06..36ca18e 100644 > >> --- a/tools/testing/selftests/ftrace/test.d/functions > >> +++ b/tools/testing/selftests/ftrace/test.d/functions > >> @@ -14,3 +14,12 @@ enable_tracing() { # start trace recording > >> reset_tracer() { # reset the current tracer > >> echo nop > current_tracer > >> } > >> + > >> +reset_trigger() { # reset all current setting triggers > >> + grep -v ^# events/*/*/trigger | > >> + while read line; do > >> + cmd=`echo $line | cut -f2- -d:` > >> + echo "!$cmd" > `echo $line | cut -f1 -d:` > > > > Broken whitespaces? > > Right, I'll fix that. > [..] > > What about checking child_comm too to verify complex filter pattern > > with string type? Maybe something like below (not tested..)? > > > > echo 'traceoff if child_pid != 0 && child_comm ~ '*sh' > events/.../trigger > > OK, I'll add more complex patterns. Hi Masami, Did you ever send an updated patch? -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html