* [PATCH] selftests/ftrace: Use long for synthetic event probe test
@ 2022-12-02 17:03 Steven Rostedt
2022-12-02 17:56 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2022-12-02 17:03 UTC (permalink / raw)
To: LKML, linux-kselftest
Cc: Shuah Khan, Shuah Khan, Masami Hiramatsu, Tom Zanussi
From 8bb1734388b89bdb2ac176882786dc02b7df92c2 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Date: Wed, 30 Nov 2022 17:31:34 -0500
Subject: [PATCH] selftests/ftrace: Use long for synthetic event probe test
On 32bit the trigger-synthetic-eprobe.tc selftest fails with the error:
hist:syscalls:sys_exit_openat: error: Param type doesn't match synthetic event field type
Command: hist:keys=common_pid:filename=$__arg__1,ret=ret:onmatch(syscalls.sys_enter_openat).trace(synth_open,$filename,$ret)
^
This is because the synth_open synthetic event is created with:
echo "$SYNTH u64 filename; s64 ret;" > synthetic_events
Which works fine on 64 bit, as filename is a pointer and the return is
also a long. But for 32 bit architectures, it doesn't work.
Use "unsigned long" and "long" instead so that it works for both 64 bit
and 32 bit architectures.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
.../test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
index 6461c375694f..c2a8ab01e13b 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc
@@ -14,7 +14,7 @@ FIELD="filename"
SYNTH="synth_open"
EPROBE="eprobe_open"
-echo "$SYNTH u64 filename; s64 ret;" > synthetic_events
+echo "$SYNTH unsigned long filename; long ret;" > synthetic_events
echo "hist:keys=common_pid:__arg__1=$FIELD" > events/$SYSTEM/$START/trigger
echo "hist:keys=common_pid:filename=\$__arg__1,ret=ret:onmatch($SYSTEM.$START).trace($SYNTH,\$filename,\$ret)" > events/$SYSTEM/$END/trigger
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/ftrace: Use long for synthetic event probe test
2022-12-02 17:03 [PATCH] selftests/ftrace: Use long for synthetic event probe test Steven Rostedt
@ 2022-12-02 17:56 ` Shuah Khan
2022-12-02 18:29 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2022-12-02 17:56 UTC (permalink / raw)
To: Steven Rostedt, LKML, linux-kselftest
Cc: Shuah Khan, Masami Hiramatsu, Tom Zanussi, Shuah Khan
On 12/2/22 10:03, Steven Rostedt wrote:
> From 8bb1734388b89bdb2ac176882786dc02b7df92c2 Mon Sep 17 00:00:00 2001
Steve,
git am doesn't like the line above and I get "Patch is empty"
error.
I had to manually remove this to apply the patch to linux-kselftest
next for the merge window.
Please check if there is something in your workflow that adds this
problematic line.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/ftrace: Use long for synthetic event probe test
2022-12-02 17:56 ` Shuah Khan
@ 2022-12-02 18:29 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-12-02 18:29 UTC (permalink / raw)
To: Shuah Khan
Cc: LKML, linux-kselftest, Shuah Khan, Masami Hiramatsu, Tom Zanussi
On Fri, 2 Dec 2022 10:56:18 -0700
Shuah Khan <skhan@linuxfoundation.org> wrote:
> On 12/2/22 10:03, Steven Rostedt wrote:
> > From 8bb1734388b89bdb2ac176882786dc02b7df92c2 Mon Sep 17 00:00:00 2001
>
> Steve,
>
> git am doesn't like the line above and I get "Patch is empty"
> error.
>
> I had to manually remove this to apply the patch to linux-kselftest
> next for the merge window.
>
> Please check if there is something in your workflow that adds this
> problematic line.
>
When I do single patches, I just insert the format-patch output directly,
and sometimes I forget to trim it :-/
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-02 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 17:03 [PATCH] selftests/ftrace: Use long for synthetic event probe test Steven Rostedt
2022-12-02 17:56 ` Shuah Khan
2022-12-02 18:29 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).