[PATCH] UBUNTU: SAUCE: ubuntu_kernel_selftests: skip ftrace unit test 'Kprobe event user-memory access' on ppc64|s390

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] UBUNTU: SAUCE: ubuntu_kernel_selftests: skip ftrace unit test 'Kprobe event user-memory access' on ppc64|s390

Paolo Pisati-5
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 <[hidden email]>
---
 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


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/APPLIED/cmnt: [PATCH] UBUNTU: SAUCE: ubuntu_kernel_selftests: skip ftrace unit test 'Kprobe event user-memory access' on ppc64|s390

Po-Hsu Lin (Sam)
Looking good, do you have a plan to upstream corresponding changes to the upstream kernel?
To allow this job to determine if it can be executed on different arches.

And you can add a [autotest-client-tests] or [ACT] to the title, it will be easier to catch.

Acked-by: Po-Hsu Lin <[hidden email]>

Applied and pushed.
Thanks

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team