<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools/testing/selftests/ftrace, branch v4.2.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.2.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.2.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-05-26T21:58:06Z</updated>
<entry>
<title>selftests/ftrace: install test.d</title>
<updated>2015-05-26T21:58:06Z</updated>
<author>
<name>Tyler Baker</name>
<email>tyler.baker@linaro.org</email>
</author>
<published>2015-04-21T22:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3bc54b5a016fce02af29ae1023e429faa5423e7f'/>
<id>urn:sha1:3bc54b5a016fce02af29ae1023e429faa5423e7f</id>
<content type='text'>
The ftrace test requires the directory test.d and all of it's contents to be
present during execution. Use TEST_DIRS to ensure this is copied to the
INSTALL_PATH.

Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Tyler Baker &lt;tyler.baker@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>ftracetest: Do not use usleep directly</title>
<updated>2015-04-03T15:16:32Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2015-04-03T00:27:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2bfd4d1f8c2bee8b0b8832be0c38d3916713625f'/>
<id>urn:sha1:2bfd4d1f8c2bee8b0b8832be0c38d3916713625f</id>
<content type='text'>
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 &lt;mpe@ellerman.id.au&gt;
Reported-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Reported-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
Suggested-by: Pádraig Brady &lt;P@draigBrady.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>ftracetest: Convert exit -1 to exit $FAIL</title>
<updated>2015-03-31T16:15:46Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2015-03-30T05:21:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=44164c4ba98c3dd3560d929ba66da51b5170ff1c'/>
<id>urn:sha1:44164c4ba98c3dd3560d929ba66da51b5170ff1c</id>
<content type='text'>
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 &lt;mpe@ellerman.id.au&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>ftracetest: Cope properly with stack tracer not being enabled</title>
<updated>2015-03-31T16:15:36Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2015-03-30T05:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a05ffdce7155769ea5ac3409e1490fb9116dbaed'/>
<id>urn:sha1:a05ffdce7155769ea5ac3409e1490fb9116dbaed</id>
<content type='text'>
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 &lt;mpe@ellerman.id.au&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: Introduce minimal shared logic for running tests</title>
<updated>2015-03-13T21:13:40Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2015-03-11T04:05:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e29a9105b1a0da86eff0ad6ae015997b49d4d1d'/>
<id>urn:sha1:5e29a9105b1a0da86eff0ad6ae015997b49d4d1d</id>
<content type='text'>
This adds a Make include file which most selftests can then include to
get the run_tests logic.

On its own this has the advantage of some reduction in repetition, and
also means the pass/fail message is defined in fewer places.

However the key advantage is it will allow us to implement install very
simply in a subsequent patch.

The default implementation just executes each program in $(TEST_PROGS).

We use a variable to hold the default implementation of $(RUN_TESTS)
because that gives us a clean way to override it if necessary, ie. using
override. The mount, memory-hotplug and mqueue tests use that to provide
a different implementation.

Tests are not run via /bin/bash, so if they are scripts they must be
executable, we add a+x to several.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>ftracetest: Add --verbose option for showing echo output</title>
<updated>2014-12-04T15:40:34Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-12-04T19:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57cee23650d768130ff2d80aa4cd0b053feabf97'/>
<id>urn:sha1:57cee23650d768130ff2d80aa4cd0b053feabf97</id>
<content type='text'>
Add --verbose/-v option for showing echo output in testcases.
This is good for checking the progress of testcases which
take a longer time to run.

To implement this feature, all the testcase failures are
captured in ftracetest and send signal to set SIG_RESULT=FAIL.

Link: http://lkml.kernel.org/r/20141204194123.7376.22964.stgit@localhost.localdomain

Suggested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftracetest: Fix to show descriptions on dash</title>
<updated>2014-12-04T15:38:49Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-12-04T19:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=36922d133c931a5a7b844204d554de6ae85bee34'/>
<id>urn:sha1:36922d133c931a5a7b844204d554de6ae85bee34</id>
<content type='text'>
The ftracetest doesn't show testcase's descriptions when
it is executed on dash. This fixes that to show the
descriptions on dash correctly by passing it via a variable
instead of directly passing the grep command output.

Link: http://lkml.kernel.org/r/20141204194116.7376.78940.stgit@localhost.localdomain

Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftracetest: Add basic event tracing test cases</title>
<updated>2014-11-06T13:40:59Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-11-06T02:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=815b18ea66d6fb67a3534edf68dfa23bdcec0485'/>
<id>urn:sha1:815b18ea66d6fb67a3534edf68dfa23bdcec0485</id>
<content type='text'>
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 &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftracetest: Clear trace buffer after running kprobe testcases</title>
<updated>2014-11-06T13:39:39Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-11-06T02:04:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce1ac64b930a9f702cc89af590728df6b345ab31'/>
<id>urn:sha1:ce1ac64b930a9f702cc89af590728df6b345ab31</id>
<content type='text'>
The kprobe testcases create, use and delete dynamic events during the
test but didn't clear the trace buffer so it'll leave the result after
it finishes.

  # ./ftracetest
  ...

  # cat trace
  # tracer: nop
  #
  # entries-in-buffer/entries-written: 2/2   #P:12
  #
  #                              _-----=&gt; irqs-off
  #                             / _----=&gt; need-resched
  #                            | / _---=&gt; hardirq/softirq
  #                            || / _--=&gt; preempt-depth
  #                            ||| /     delay
  #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
  #              | |       |   ||||       |         |
        ftracetest-26474 [009] d..1 79417.143782: Unknown type 1099
        ftracetest-26498 [009] d..1 79417.208034: Unknown type 1101

Link: http://lkml.kernel.org/r/1415239470-28705-2-git-send-email-namhyung@kernel.org

Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftracetest: Use logfile name supported by busybox's mktemp</title>
<updated>2014-11-06T13:38:46Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-11-06T02:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=347e0e46b1515165ec3e2786ff5bee31eb778bb5'/>
<id>urn:sha1:347e0e46b1515165ec3e2786ff5bee31eb778bb5</id>
<content type='text'>
When I run the ftracetest in a busybox docker container, I saw
following error.  Make the logfile template to comply with busybox's
mktemp.  It also keep the logfiles under the logs directory.

  # /linux/tools/testing/selftests/ftrace/ftracetest
  === Ftrace unit tests ===
  mktemp: unrecognized option `--tmpdir=/linux/tools/testing/selftests/ftrace/logs/20141106-003624/'
  BusyBox v1.22.1 (2014-05-22 23:22:11 UTC) multi-call binary.

  Usage: mktemp [-dt] [-p DIR] [TEMPLATE]

  Create a temporary file with name based on TEMPLATE and print its name.
  TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
  Without TEMPLATE, -t tmp.XXXXXX is assumed.

  	-d	  Make directory, not file
  	-q	  Fail silently on errors
  	-t	  Prepend base directory name to TEMPLATE
  	-p DIR	  Use DIR as a base directory (implies -t)
  	-u Do not create anything; print a name

  Base directory is: -p DIR, else $TMPDIR, else /tmp

  [1] Basic trace file check/linux/tools/testing/selftests/ftrace/ftracetest: line 244: can't create : nonexistent directory
  /linux/tools/testing/selftests/ftrace/ftracetest: line 244: can't create : nonexistent directory
						  [FAIL]

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

Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
