aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-11Merge tag 'trace-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-traceLinus Torvalds12-0/+151
Pull tracing updates from Steven Rostedt: "The biggest change for this release is in the histogram code: - Add "onchange(var)" histogram handler that executes a action when $var changes. - Add new "snapshot()" action for histogram handlers, that causes a snapshot of the ring buffer when triggered. ie. onchange(var).snapshot() will trigger a snapshot if var changes. - Add alternative for "trace()" action. Currently, to trigger a synthetic event, the name of that event is used as the handler name, which is inconsistent with the other actions. onchange(var).synthetic(param) where it can now be onchange(var).trace(synthetic, param). The older method will still be allowed, as long as the synthetic events do not overlap with other handler names. - The histogram documentation at testcases were updated for the new changes. Outside of the histogram code, we have: - Added a quicker way to enable set_ftrace_filter files, that will make it much quicker to bisect tracing a function that shouldn't be traced and crashes the kernel. (You can echo in numbers to set_ftrace_filter, and it will select the corresponding function that is in available_filter_functions). - Some better displaying of the tracing data (and more information was added). The rest are small fixes and more clean ups to the code" * tag 'trace-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (37 commits) tracing: Use strncpy instead of memcpy when copying comm in trace.c tracing: Use strncpy instead of memcpy when copying comm for hist triggers tracing: Use strncpy instead of memcpy for string keys in hist triggers tracing: Use str_has_prefix() in synth_event_create() x86/ftrace: Fix warning and considate ftrace_jmp_replace() and ftrace_call_replace() tracing/perf: Use strndup_user() instead of buggy open-coded version doc: trace: Fix documentation for uprobe_profile tracing: Fix spelling mistake: "analagous" -> "analogous" tracing: Comment why cond_snapshot is checked outside of max_lock protection tracing: Add hist trigger action 'expected fail' test case tracing: Add alternative synthetic event trace action test case tracing: Add hist trigger onchange() handler test case tracing: Add hist trigger snapshot() action test case tracing: Add SPDX license GPL-2.0 license identifier to inter-event testcases tracing: Add alternative synthetic event trace action syntax tracing: Add hist trigger onchange() handler Documentation tracing: Add hist trigger onchange() handler tracing: Add hist trigger snapshot() action Documentation tracing: Add hist trigger snapshot() action tracing: Add conditional snapshot ...
2019-02-25selftests/ftrace: Handle the absence of tputJuerg Haefliger1-2/+2
In environments where tput is not available, we get the following error $ ./ftracetest: 163: [: Illegal number: because ncolors is an empty string. Fix that by setting it to 0 if the tput command fails. Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Juerg Haefliger <juergh@canonical.com> Signed-off-by: Shuah Khan <shuah@kernel.org>
2019-02-22selftests/ftrace: Replace \e with \033Juerg Haefliger1-4/+4
The \e sequence character is not POSIX. Fix that by using \033 instead. Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Juerg Haefliger <juergh@canonical.com> Signed-off-by: Shuah Khan <shuah@kernel.org>
2019-02-22selftests/ftrace: Replace echo -e with printfJuerg Haefliger1-2/+7
echo -e is not POSIX. Depending on what /bin/sh is, we can get incorrect output like: $ -e -n [1] Basic trace file check $ -e [PASS] Fix that by using printf instead. Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Juerg Haefliger <juergh@canonical.com> Signed-off-by: Shuah Khan <shuah@kernel.org>
2019-02-20tracing: Add hist trigger action 'expected fail' test caseTom Zanussi1-0/+30
Add a test case verifying that basic action combinations fail as expected. Link: http://lkml.kernel.org/r/1790bf93e01dbdfa1b4af945f42147d92bd565aa.1550100284.git.tom.zanussi@linux.intel.com Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-02-20tracing: Add alternative synthetic event trace action test caseTom Zanussi1-0/+42
Add a test case for the alternative trace(<synthetic_event, params) synthetic event generation syntax. Link: http://lkml.kernel.org/r/0616d18423ab1dfdbf333bce9c92ac4fa0779207.1550100284.git.tom.zanussi@linux.intel.com Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-02-20tracing: Add hist trigger onchange() handler test caseTom Zanussi1-0/+28
Add a test case verifying the basic functionality of the hist:onchange($var) handler. Link: http://lkml.kernel.org/r/bec87aa8ed7d81794510b3d465096a750c71fce7.1550100284.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-02-20tracing: Add hist trigger snapshot() action test caseTom Zanussi1-0/+43
Add a test case verifying the basic functionality of the hist:snapshot() action. Link: http://lkml.kernel.org/r/c0555f462cbfe56dadfec6e63e531e109bd72930.1550100284.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-02-20tracing: Add SPDX license GPL-2.0 license identifier to inter-event testcasesTom Zanussi8-0/+8
Apparently this directory was missed in the license cleanup process - add the missing identifiers to the trigger/inter-event test cases. Link: http://lkml.kernel.org/r/6f9828c2cfb0b378ebd217a39a1b44f063fc17fb.1550100284.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-12-31Merge tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-traceLinus Torvalds4-0/+156
Pull tracing updates from Steven Rostedt: - Rework of the kprobe/uprobe and synthetic events to consolidate all the dynamic event code. This will make changes in the future easier. - Partial rewrite of the function graph tracing infrastructure. This will allow for multiple users of hooking onto functions to get the callback (return) of the function. This is the ground work for having kprobes and function graph tracer using one code base. - Clean up of the histogram code that will facilitate adding more features to the histograms in the future. - Addition of str_has_prefix() and a few use cases. There currently is a similar function strstart() that is used in a few places, but only returns a bool and not a length. These instances will be removed in the future to use str_has_prefix() instead. - A few other various clean ups as well. * tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits) tracing: Use the return of str_has_prefix() to remove open coded numbers tracing: Have the historgram use the result of str_has_prefix() for len of prefix tracing: Use str_has_prefix() instead of using fixed sizes tracing: Use str_has_prefix() helper for histogram code string.h: Add str_has_prefix() helper function tracing: Make function ‘ftrace_exports’ static tracing: Simplify printf'ing in seq_print_sym tracing: Avoid -Wformat-nonliteral warning tracing: Merge seq_print_sym_short() and seq_print_sym_offset() tracing: Add hist trigger comments for variable-related fields tracing: Remove hist trigger synth_var_refs tracing: Use hist trigger's var_ref array to destroy var_refs tracing: Remove open-coding of hist trigger var_ref management tracing: Use var_refs[] for hist trigger reference checking tracing: Change strlen to sizeof for hist trigger static strings tracing: Remove unnecessary hist trigger struct field tracing: Fix ftrace_graph_get_ret_stack() to use task and not current seq_buf: Use size_t for len in seq_buf_puts() seq_buf: Make seq_buf_puts() null-terminate the buffer arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack ...
2018-12-10selftests/ftrace: Add testcases for dynamic eventMasami Hiramatsu4-0/+156
Add common testcases for dynamic_events interface. - Add/remove kprobe events via dynamic_events - Add/remove synthetic events via dynamic_events - Selective clear events (clear events other interfaces) - Genelic clear events ("!LINE" syntax) Link: http://lkml.kernel.org/r/154140872590.17322.10394440849261743052.stgit@devbox Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com> Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-11-29selftests/ftrace: Fix invalid SPDX identifiersThomas Gleixner5-5/+5
While GPL2.0 looks about right, the correct and valid identifiers for GPL v2 only code are 'GPL-2.0' or 'GPL-2.0-only'. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org> Signed-off-by: Shuah Khan <shuah@kernel.org>
2018-10-30Merge tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-traceLinus Torvalds1-6/+6
Pull tracing fixes from Steven Rostedt: "Masami had a couple more fixes to the synthetic events. One was a proper error return value, and the other is for the self tests" * tag 'trace-v4.19-rc8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: selftests/ftrace: Fix synthetic event test to delete event correctly tracing: Return -ENOENT if there is no target synthetic event
2018-10-28selftests/ftrace: Fix synthetic event test to delete event correctlyMasami Hiramatsu1-6/+6
Fix the synthetic event test case to remove event correctly. If redirecting command to synthetic_event file without append mode, it cleans up all existing events and execute (parse) the command. This means "delete event" always fails to find the target event. Since previous synthetic event has a bug which doesn't return -ENOENT even if it fails to find the deleting event, this test passed. But fixing that bug, this test fails because this test itself has a bug. This fixes that bug by trying to delete event right after adding an event, and use append mode redirection ('>>') instead of normal redirection ('>'). Link: http://lkml.kernel.org/r/154013452832.25576.2305459545429386517.stgit@devbox Acked-by: Shuah Khan <shuah@kernel.org> Acked-by: Tom Zanussi <zanussi@linux.intel.com> Tested-by: Tom Zanussi <zanussi@linux.intel.com> Cc: Tom Zanussi <zanussi@kernel.org> Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Cc: Rajvi Jingar <rajvi.jingar@intel.com> Cc: Shuah Khan <shuah@kernel.org> Cc: stable@vger.kernel.org Fixes: f06eec4d0f2c ('selftests: ftrace: Add inter-event hist triggers testcases') Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-10-24selftests/ftrace: Strip escape sequences for log fileMasami Hiramatsu1-2/+9
Strip escape sequences from the stream to the ftracetest summary log file. Note that all test-case results are dumped raw in each file. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Use colored output when availableDaniel Díaz1-7/+22
If test is being directly executed (with stdout opened on the terminal) and the terminal capabilities indicate enough colors, then use the existing scheme of green, red, and blue to show when tests pass, fail or end in a different way. When running the tests redirecting the stdout, for instance, to a file, then colors are not shown, thus producing a more readable output. Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add color to the PASS / FAIL resultsSteven Rostedt (VMware)1-8/+8
Now that ftracetest has over 80 tests, it is difficult to simply scroll up the console window to find the failed tests when it reports just two tests have failed. In order to make this stand out better, have the color of the word "PASS" be green, "FAIL" and "XFAIL" be red, and all other results be blue. This helps tremendously in quickly spotting the failed tests by just scrolling up the console window. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add ftrace cpumask testcaseMasami Hiramatsu1-0/+42
Add a testcase for tracing_cpumask with function tracer. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add wakeup_rt tracer testcaseMasami Hiramatsu1-0/+25
Add a testcase for wakeup_rt tracer. This requires chrt command to test. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add wakeup tracer testcaseMasami Hiramatsu2-0/+26
Add a testcase for wakeup tracer. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add stacktrace ftrace filter command testcaseMasami Hiramatsu1-0/+12
Add a test case for stacktrace filter command for ftrace. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add trace_pipe testcaseMasami Hiramatsu1-0/+16
Add a simple testcase for trace_pipe which can consume ringbuffer. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add function filter on module testcaseMasami Hiramatsu1-0/+24
Add a testcase for function filter on module. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add max stack tracer testcaseMasami Hiramatsu1-0/+39
Add a testcase for max stack tracer, which checks basic max stack usage tracing and its filter feature. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add function profiling stat testcaseMasami Hiramatsu1-0/+22
Add a testcase for function profiling per-cpu statistics interface. There is already func_profile.tc, but that is mainly focusing on the combination of function-profiler and function tracer. This testcase ensures trace_stat per-cpu function statistics is correctly updated. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add ringbuffer size changing testcaseMasami Hiramatsu1-0/+22
Add a testcase for changing ringbuffer size. This tests not only ringbuffer size but also tests the imbalance per-cpu buffer size change too. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add trace_printk sample module testMasami Hiramatsu1-0/+27
Add trace_printk sample module test. This requires to enable trace_printk.ko module for test. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add kprobe-event with symbol argument testMasami Hiramatsu2-0/+40
Add a testcase for kprobe-event with @symbol argument. Since @symbol needs to refer the kernel data symbol (linux_proc_banner), it requires CONFIG_KALLSYMS_ALL. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add kprobe profile testcaseMasami Hiramatsu1-0/+15
Add a testcase for testing kprobe_profile interface which provides per-kprobe event hit/misshit counts. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add kprobe event with $comm argument testcaseMasami Hiramatsu1-0/+17
Add kprobe-event with $comm argument testcase to ftracetest. This not only checks syntax but also checks log file. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Check set_event_pid resultMasami Hiramatsu1-0/+1
Ensure the set_event_pid shows set pid list. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Test kprobe-event argument with various bitsizeMasami Hiramatsu1-16/+32
Improve the kprobe-event with argument types testcase to test it with various bitsize. kprobe-event argument can be recorded in given types with various bitsize (8, 16, 32, 64), thus the type testcase should test the different bitsize too. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Improve kretprobe testcase to check log dataMasami Hiramatsu1-1/+6
Improve kretprobe testcase to check the log data correctness and ensure the event definition is corrctly including argument definition. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Improve kprobe testcase to check log dataMasami Hiramatsu1-1/+5
Improve kprobe testcase to check the log data correctness and ensure the event definition is corrctly including argument definition. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Improve kprobe on module testcase to load/unload moduleMasami Hiramatsu2-3/+36
Improve kprobe events on module testcase to check module load/unload with disabled/enabled events. This also change the target module to trace_printk.ko, so it depends on CONFIG_SAMPLE_TRACE_PRINTK=m. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Use loopback address instead of localhostMasami Hiramatsu11-25/+14
Use raw loopback address instead of localhost, because "localhost" can depend on nsswitch and in some case we can not resolve the localhost. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Fix checkbashisms errorsMasami Hiramatsu1-2/+2
Fix a test case to make checkbashisms clean. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Fix to test kprobe $comm arg only if availableMasami Hiramatsu1-0/+3
Test $comm in kprobe-event argument syntax testcase only if it is supported on the kernel because $comm has been introduced 4.8 kernel. So on older stable kernel, it should be skipped. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Remove unneeded per-test init/cleanup ftraceMasami Hiramatsu44-378/+1
Since ftracetest framework calls initialize_ftrace() right before each test and after all tests, we don't need to init/cleanup ftrace for each test case. Just remove such unneeded init/cleanup code because it can increase logfile size. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Cleanup ftrace after running testMasami Hiramatsu1-0/+1
Cleanup ftrace by initialize_ftrace() after running all test cases. This means we also don't need cleanup ftrace on each test case, except for some special options. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add SPDX License Identifier to templateMasami Hiramatsu1-0/+1
Add SPDX License Identifier line to template file so that someone who makes new testcase from the template does not forgot it. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: More initialize features in initialize_ftraceMasami Hiramatsu1-0/+5
Clear pid filter, synthetic_events, snapshots, ftrace filter, and trace log in initialize_ftrace(), since those are used in test cases. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add case number prefix to logfileMasami Hiramatsu1-2/+2
Add a case number prefix to each logfile. This makes it easier to find which logfile is corresponding to which failure. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add --console hidden optionMasami Hiramatsu1-1/+13
Add --console hidden option for debug test cases. This option allows to put "sh" or something else when the test case hits a bug. For example, if you find a testcase which doesn't pass, you can insert sh for interactive debug as below ----- #!/bin/sh # description: sample test case good-command suspicious-wrong-command sh # <- add this for interactive debug ----- Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-24selftests/ftrace: Add --stop-fail hidden option for debugMasami Hiramatsu1-0/+13
Add --stop-fail option for debugging the ftracetest. With this option, ftracetest stops right after a testcase fails instead of finish running all testcases. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-10-19selftests: ftrace: Add synthetic event syntax testcaseMasami Hiramatsu1-0/+80
Add a testcase to check the syntax and field types for synthetic_events interface. Link: http://lkml.kernel.org/r/153986838264.18251.16627517536956299922.stgit@devbox Acked-by: Shuah Khan <shuah@kernel.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-07-30selftests/ftrace: Fix kprobe string testcase to not probe notrace functionMasami Hiramatsu2-19/+13
Fix kprobe string argument testcase to not probe notrace function. Instead, it probes tracefs function which must be available with ftrace. Link: http://lkml.kernel.org/r/153294607107.32740.1664854684396589624.stgit@devbox Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-07-26kselftests: Add tests for the preemptoff and irqsoff tracersJoel Fernandes (Google)2-0/+76
Here we add unit tests for the preemptoff and irqsoff tracer by using a kernel module introduced previously to trigger long preempt or irq disabled sections in the kernel. Link: http://lkml.kernel.org/r/20180711063540.91101-3-joel@joelfernandes.org Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-07-25selftests/ftrace: Add snapshot and tracing_on test caseMasami Hiramatsu1-0/+28
Add a testcase for checking snapshot and tracing_on relationship. This ensures that the snapshotting doesn't affect current tracing on/off settings. Link: http://lkml.kernel.org/r/153149932412.11274.15289227592627901488.stgit@devbox Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Cc: Hiraku Toyooka <hiraku.toyooka@cybertrust.co.jp> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-06-15Merge tag 'linux-kselftest-4.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftestLinus Torvalds2-0/+15
Pull more Kselftest updates from Shuah Khan: - fix a signedness bug in cgroups test - add ppc support for kprobe args tests * tag 'linux-kselftest-4.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kselftest/cgroup: fix a signedness bug selftests/ftrace: Add ppc support for kprobe args tests