kselftests/ftrace: Add hist trigger testcases
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 3 Mar 2016 18:55:01 +0000 (12:55 -0600)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 19 Apr 2016 22:56:02 +0000 (18:56 -0400)
commit76929ab51f0ee398bcf72286c4b377051f07a31b
treed97581dee4924f0687be61ae87e13ae64760b2b2
parentcfa0963dc474fd098d6a7a722dcecfc143a4b377
kselftests/ftrace: Add hist trigger testcases

Add the hist trigger testcases for ftracetest.
This checks the basic histogram trigger behaviors like as;
 - Histogram trigger itself
 - Histogram with string key
 - Histogram with compound keys
 - Histogram with sort key
 - Histogram trigger modifiers (execname, hex, syscall)
 - Multiple histograms on an event
 - Named histogram
 - Named histogram on multi events

Here is the test result.
  ----
  # ./ftracetest test.d/trigger/*hist*.tc
  === Ftrace unit tests ===
  [1] event trigger - test histogram modifiers    [PASS]
  [2] event trigger - test histogram trigger      [PASS]
  [3] event trigger - test multiple histogram triggers    [PASS]

  # of passed:  3
  # of failed:  0
  # of unresolved:  0
  # of untested:  0
  # of unsupported:  0
  # of xfailed:  0
  # of undefined(test bug):  0
  ----

Link: http://lkml.kernel.org/r/17cb3a3d9eeadc3282645147905455a298e7fbeb.1457029949.git.tom.zanussi@linux.intel.com
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
[Tom Zanussi: Change multihist test from truncate ('>') to append ('>>')]
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc [new file with mode: 0644]
tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc [new file with mode: 0644]
tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc [new file with mode: 0644]