[2/2] selftests/ftrace: Fix to check fprobe event eneblement

Message ID 169024904889.395371.17998733386857387118.stgit@devnote2
State New
Headers
Series tracing/probes: Fixes for v6.5-rc2 |

Commit Message

Masami Hiramatsu (Google) July 25, 2023, 1:37 a.m. UTC
  From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

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".

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
 .../ftrace/test.d/dynevent/add_remove_btfarg.tc    |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc
index b89de1771655..f34b14ef9781 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc
@@ -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