diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-12-01 01:31:34 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-12-02 20:53:03 +0300 |
commit | d5ba85d6d8be7da660d4ac25761a48c74ade958d (patch) | |
tree | 289053b4ef61179b351cb69c484dad5be42288c8 /tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | |
parent | 8008d88e6d160c4e73de5be7c3dcc54e3ccccf49 (diff) | |
download | linux-d5ba85d6d8be7da660d4ac25761a48c74ade958d.tar.xz |
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>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | 2 |
1 files changed, 1 insertions, 1 deletions
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 914fe2e5d030..a5c117e80ae0 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 |