Thread (15 messages) 15 messages, 4 authors, 2024-11-06

Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2024-11-03 04:58:02
Also in: linux-kselftest, linuxppc-dev, lkml

On Sat,  2 Nov 2024 00:49:25 +0530
Hari Bathini [off-list ref] wrote:
For ppc64le, depending on the kernel configuration used, offset 16
from function start address can also be considered function entry.
Update the test case to accommodate such configurations.
Hi Hari, so have you met any error on this test case?
Can you share the error result too?

Thank you,
quoted hunk ↗ jump to hunk
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 .../selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc    | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
index a16c6a6f6055..c03b94cc5784 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
@@ -111,7 +111,11 @@ check_error 'p vfs_read $arg* ^$arg*'		# DOUBLE_ARGS
 if !grep -q 'kernel return probes support:' README; then
 check_error 'r vfs_read ^$arg*'			# NOFENTRY_ARGS
 fi
+if [ "$(uname -m)" = "ppc64le" ]; then
+check_error 'p vfs_read+20 ^$arg*'		# NOFENTRY_ARGS
+else
 check_error 'p vfs_read+8 ^$arg*'		# NOFENTRY_ARGS
+fi
 check_error 'p vfs_read ^hoge'			# NO_BTFARG
 check_error 'p kfree ^$arg10'			# NO_BTFARG (exceed the number of parameters)
 check_error 'r kfree ^$retval'			# NO_RETVAL
-- 
2.47.0

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help