1
0
Fork 0
Commit Graph

4 Commits (ef3ad0898a60d30da7f170032992914998c366e5)

Author SHA1 Message Date
Masami Hiramatsu 1d0864db8f selftests/ftrace: Reduce trace buffer checking overhead
Current event/toplevel-enable.tc checking the trace
buffer by dumping all events while recording events.
However, this makes system very busy.

To reduce this overhead comes from reading trace buffer
and recording trace buffer, use head instead of cat
and stop tracing while reading.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-06-07 10:07:22 -06:00
Namhyung Kim 2bfd4d1f8c ftracetest: Do not use usleep directly
The usleep is only provided on distros from Redhat so running ftracetest
on other distro resulted in failures due to the missing usleep.

The reason of using [u]sleep in the test was to generate (scheduler)
events.  It can be done various ways like this:

yield() {  ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1; }

For more information to the history of this patch, please refer to:

Link: http://lkml.kernel.org/r/1427329943-16896-1-git-send-email-namhyung@kernel.org

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Reported-by: Luis Henriques <luis.henriques@canonical.com>
Suggested-by: Pádraig Brady <P@draigBrady.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-04-03 09:16:32 -06:00
Michael Ellerman 44164c4ba9 ftracetest: Convert exit -1 to exit $FAIL
POSIX says that exit takes an unsigned integer between 0 and 255, so
using -1 doesn't work on POSIX shells.

There is already a well-defined failure code, $FAIL (1), so use that.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-03-31 10:15:46 -06:00
Namhyung Kim 815b18ea66 ftracetest: Add basic event tracing test cases
This patch adds basic event tracing tests like enable/disable with
top-level, subsystem-level and individual event files.

  # ./ftracetest
  === Ftrace unit tests ===
  [1] Basic trace file check	[PASS]
  [2] Basic trace clock test	[PASS]
  [3] Basic event tracing check	[PASS]
  [4] Basic test for tracers	[PASS]
  [5] event tracing - enable/disable with top level files	[PASS]
  [6] event tracing - enable/disable with subsystem level files	[PASS]
  [7] event tracing - enable/disable with event level files	[PASS]
  [8] ftrace - function graph filters	[PASS]
  [9] ftrace - function profiler with function tracing	[PASS]
  [10] ftrace - function graph filters with stack tracer	[PASS]
  [11] Kretprobe dynamic event with arguments	[PASS]
  [12] Kprobe dynamic event - busy event check	[PASS]
  [13] Kprobe dynamic event with arguments	[PASS]
  [14] Kprobe dynamic event - adding and removing	[PASS]

  # of passed:  14
  # 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/1415239470-28705-3-git-send-email-namhyung@kernel.org

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-06 08:40:59 -05:00