hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
....@@ -2,6 +2,9 @@
22 # SPDX-License-Identifier: GPL-2.0
33 # description: ftrace - test reading of set_ftrace_filter
44 #
5
+# The triggers are set within the set_ftrace_filter file
6
+# requires: set_ftrace_filter
7
+#
58 # The set_ftrace_filter file of ftrace is used to list functions as well as
69 # triggers (probes) attached to functions. The code to read this file is not
710 # straight forward and has had various bugs in the past. This test is designed
....@@ -9,27 +12,10 @@
912 # file in various ways (cat vs dd).
1013 #
1114
12
-# The triggers are set within the set_ftrace_filter file
13
-if [ ! -f set_ftrace_filter ]; then
14
- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
15
- exit_unsupported
16
-fi
17
-
18
-do_reset() {
19
- reset_tracer
20
- reset_ftrace_filter
21
- disable_events
22
- clear_trace
23
- enable_tracing
24
-}
25
-
2615 fail() { # mesg
27
- do_reset
2816 echo $1
2917 exit_fail
3018 }
31
-
32
-do_reset
3319
3420 FILTER=set_ftrace_filter
3521 FUNC1="schedule"
....@@ -164,7 +150,5 @@
164150
165151 rm $TMPDIR/expected
166152 rm $TMPDIR/actual
167
-
168
-do_reset
169153
170154 exit 0