xref: /openbmc/linux/tools/testing/selftests/ftrace/README (revision 6e68e6c5e4b67a02aaa406da6124ea5cae7d5e10)
1Linux Ftrace Testcases
2
3This is a collection of testcases for ftrace tracing feature in the Linux
4kernel. Since ftrace exports interfaces via the debugfs, we just need
5shell scripts for testing. Feel free to add new test cases.
6
7Running the ftrace testcases
8============================
9
10At first, you need to be the root user to run this script.
11To run all testcases:
12
13  $ sudo ./ftracetest
14
15To run specific testcases:
16
17  # ./ftracetest test.d/basic3.tc
18
19Or you can also run testcases under given directory:
20
21  # ./ftracetest test.d/kprobe/
22
23Contributing new testcases
24==========================
25
26Copy test.d/template to your testcase (whose filename must have *.tc
27extension) and rewrite the test description line.
28
29 * The working directory of the script is <debugfs>/tracing/.
30
31 * Take care with side effects as the tests are run with root privilege.
32
33 * The tests should not run for a long period of time (more than 1 min.)
34   These are to be unit tests.
35
36 * You can add a directory for your testcases under test.d/ if needed.
37
38 * The test cases should run on dash (busybox shell) for testing on
39   minimal cross-build environments.
40
41TODO
42====
43
44 * Fancy colored output :)
45
46