[PATCH] UBUNTU: SAUCE: ubuntu_kernel_selftests: skip ftrace unit test 'Kprobe event user-memory access' on ppc64|s390
Paolo Pisati
paolo.pisati at canonical.com
Thu Mar 26 16:27:07 UTC 2020
BugLink: https://bugs.launchpad.net/bugs/1869227
Ftrace 'Kprobe event user-memory access' test constantly fails on ppc64:
ftrace/test.d/kprobe/kprobe_args_user.tc:
...
grep -q '\$arg<N>' README || exit_unresolved # depends on arch
...
the above README file is '/sys/kernel/tracing/README' and that
grep line fails since '\$arg<N>' is only available if:
kernel/trace/trace.c:
#ifdef CONFIG_HAVE_FUNCTION_ARG_ACCESS_API
"\t $stack<index>, $stack, $retval, $comm, $arg<N>,\n"
#else
"\t $stack<index>, $stack, $retval, $comm,\n"
#endif
and HAVE_FUNCTION_ARG_ACCESS_API is true only on architectures that
supports the API needed to access function arguments from pt_regs,
declared in asm/ptrace.h.
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
ubuntu_kernel_selftests/ubuntu_kernel_selftests.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
index aa5f9430..cb1a4d4b 100644
--- a/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
+++ b/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py
@@ -154,6 +154,16 @@ class ubuntu_kernel_selftests(test.test):
'kprobe/probepoint.tc',
'kprobe/kprobe_module.tc',
]
+
+ #
+ # Ftrace 'Kprobe event user-memory access' test depends on
+ # HAVE_FUNCTION_ARG_ACCESS_API, but ppc64 doesn't support it:
+ # disable it to avoid an unresolved result (and thus a failure).
+ #
+ arch = platform.processor()
+ if arch in ['ppc64le', 's390x']:
+ filenames.append('kprobe/kprobe_args_user.tc')
+
for fn in filenames:
fn = 'linux/tools/testing/selftests/ftrace/test.d/' + fn
if os.path.exists(fn):
--
2.25.1
More information about the kernel-team
mailing list