diff mbox series

[3/3] tracing/selftests: Update kprobe args char/string to match new functions

Message ID 20230913030021.967983629@goodmis.org (mailing list archive)
State Superseded
Headers show
Series tracing: Remove eventfs_files by use of callbacks | expand

Commit Message

Steven Rostedt Sept. 13, 2023, 2:58 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The function that the kprobe_args_char and kprobes_arg_string attaches to
for its test has changed its name once again. Now we need to check for
eventfs_create_dir(), and if it exists, use that, otherwise check for
eventfs_add_dir() and if that exists use that, otherwise use the original
tracefs_create_dir()!

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 .../selftests/ftrace/test.d/kprobe/kprobe_args_char.tc        | 4 +++-
 .../selftests/ftrace/test.d/kprobe/kprobe_args_string.tc      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Comments

Masami Hiramatsu (Google) Sept. 13, 2023, 2:28 p.m. UTC | #1
On Tue, 12 Sep 2023 22:58:58 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> The function that the kprobe_args_char and kprobes_arg_string attaches to
> for its test has changed its name once again. Now we need to check for
> eventfs_create_dir(), and if it exists, use that, otherwise check for
> eventfs_add_dir() and if that exists use that, otherwise use the original
> tracefs_create_dir()!

OK, looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you,

> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  .../selftests/ftrace/test.d/kprobe/kprobe_args_char.tc        | 4 +++-
>  .../selftests/ftrace/test.d/kprobe/kprobe_args_string.tc      | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
> index ff7499eb98d6..c639c6c8ca03 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
> @@ -34,7 +34,9 @@ mips*)
>  esac
>  
>  : "Test get argument (1)"
> -if grep -q eventfs_add_dir available_filter_functions; then
> +if grep -q eventfs_create_dir available_filter_functions; then
> +  DIR_NAME="eventfs_create_dir"
> +elif grep -q eventfs_add_dir available_filter_functions; then
>    DIR_NAME="eventfs_add_dir"
>  else
>    DIR_NAME="tracefs_create_dir"
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> index a202b2ea4baf..a5ab4d5c74ac 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> @@ -37,7 +37,9 @@ loongarch*)
>  esac
>  
>  : "Test get argument (1)"
> -if grep -q eventfs_add_dir available_filter_functions; then
> +if grep -q eventfs_create_dir available_filter_functions; then
> +  DIR_NAME="eventfs_create_dir"
> +elif grep -q eventfs_add_dir available_filter_functions; then
>    DIR_NAME="eventfs_add_dir"
>  else
>    DIR_NAME="tracefs_create_dir"
> -- 
> 2.40.1
diff mbox series

Patch

diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
index ff7499eb98d6..c639c6c8ca03 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc
@@ -34,7 +34,9 @@  mips*)
 esac
 
 : "Test get argument (1)"
-if grep -q eventfs_add_dir available_filter_functions; then
+if grep -q eventfs_create_dir available_filter_functions; then
+  DIR_NAME="eventfs_create_dir"
+elif grep -q eventfs_add_dir available_filter_functions; then
   DIR_NAME="eventfs_add_dir"
 else
   DIR_NAME="tracefs_create_dir"
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
index a202b2ea4baf..a5ab4d5c74ac 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
@@ -37,7 +37,9 @@  loongarch*)
 esac
 
 : "Test get argument (1)"
-if grep -q eventfs_add_dir available_filter_functions; then
+if grep -q eventfs_create_dir available_filter_functions; then
+  DIR_NAME="eventfs_create_dir"
+elif grep -q eventfs_add_dir available_filter_functions; then
   DIR_NAME="eventfs_add_dir"
 else
   DIR_NAME="tracefs_create_dir"