selftests/ftrace: Fix to check fprobe event eneblement
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 25 Jul 2023 01:37:29 +0000 (10:37 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 26 Jul 2023 03:54:17 +0000 (12:54 +0900)
Fix to check the availability of fprobe and kprobes for
add_remove_btfarg.tc.
Only if both kprobe and fprobe are not supported, it should return
"unsupported".

Link: https://lore.kernel.org/all/169024904889.395371.17998733386857387118.stgit@devnote2/
Fixes: 4231f30fcc34 ("selftests/ftrace: Add BTF arguments test cases")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc

index b89de17..f34b14e 100644 (file)
@@ -13,7 +13,7 @@ if grep -qF "f[:[<group>/][<event>]] <func-name>[%return] [<args>]" README ; the
   FPROBES=yes
 fi
 
-if [ -z "$KPROBES" -a "$FPROBES" ] ; then
+if [ -z "$KPROBES" -a -z "$FPROBES" ] ; then
   exit_unsupported
 fi