hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
....@@ -1,6 +1,7 @@
11 #!/bin/sh
22 # SPDX-License-Identifier: GPL-2.0
33 # description: ftrace - function profiler with function tracing
4
+# requires: function_profile_enabled set_ftrace_filter function_graph:tracer
45
56 # There was a bug after a rewrite of the ftrace infrastructure that
67 # caused the function_profiler not to be able to run with the function
....@@ -13,24 +14,8 @@
1314 # This test triggers those bugs on those kernels.
1415 #
1516 # We need function_graph and profiling to to run this test
16
-if ! grep -q function_graph available_tracers; then
17
- echo "no function graph tracer configured"
18
- exit_unsupported;
19
-fi
20
-
21
-if [ ! -f set_ftrace_filter ]; then
22
- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
23
- exit_unsupported
24
-fi
25
-
26
-if [ ! -f function_profile_enabled ]; then
27
- echo "function_profile_enabled not found, function profiling enabled?"
28
- exit_unsupported
29
-fi
3017
3118 fail() { # mesg
32
- reset_tracer
33
- echo > set_ftrace_filter
3419 echo $1
3520 exit_fail
3621 }
....@@ -75,7 +60,5 @@
7560 cat trace
7661 fail "no other functions besides schedule was found"
7762 fi
78
-
79
-reset_tracer
8063
8164 exit 0