aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-02-06 17:10:12 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-02-08 10:13:09 -0500
commitdf9d36d9e8adefe0975c7b5888967651b3db3af3 (patch)
tree32731d7ed05478f7ba9d8a73a87bdc30380c6a2c
parent07234021410bbc27b7c86c18de98616c29fbe667 (diff)
selftests/ftrace: Have reset_ftrace_filter handle modules
If a function probe in set_ftrace_filter belongs to a module, it will contain the module name. Like: wmi_query_block [wmi]:traceoff:unlimited But writing: '!wmi_query_block [wmi]:traceoff' > set_ftrace_filter will cause an error. We still need to write: '!wmi_query_block:traceoff' > set_ftrace_filter Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--tools/testing/selftests/ftrace/test.d/functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
index f2019b37370d..e7c4c7b752a2 100644
--- a/tools/testing/selftests/ftrace/test.d/functions
+++ b/tools/testing/selftests/ftrace/test.d/functions
@@ -37,17 +37,18 @@ reset_ftrace_filter() { # reset all triggers in set_ftrace_filter
37 if [ "$tr" = "" ]; then 37 if [ "$tr" = "" ]; then
38 continue 38 continue
39 fi 39 fi
40 name=`echo $t | cut -d: -f1 | cut -d' ' -f1`
40 if [ $tr = "enable_event" -o $tr = "disable_event" ]; then 41 if [ $tr = "enable_event" -o $tr = "disable_event" ]; then
41 tr=`echo $t | cut -d: -f1-4` 42 tr=`echo $t | cut -d: -f2-4`
42 limit=`echo $t | cut -d: -f5` 43 limit=`echo $t | cut -d: -f5`
43 else 44 else
44 tr=`echo $t | cut -d: -f1-2` 45 tr=`echo $t | cut -d: -f2`
45 limit=`echo $t | cut -d: -f3` 46 limit=`echo $t | cut -d: -f3`
46 fi 47 fi
47 if [ "$limit" != "unlimited" ]; then 48 if [ "$limit" != "unlimited" ]; then
48 tr="$tr:$limit" 49 tr="$tr:$limit"
49 fi 50 fi
50 echo "!$tr" > set_ftrace_filter 51 echo "!$name:$tr" > set_ftrace_filter
51 done 52 done
52} 53}
53 54