diff mbox series

[bpf-next] selftests/bpf: Define SYS_NANOSLEEP_KPROBE_NAME for aarch64

Message ID 20220404142101.27900-1-iii@linux.ibm.com (mailing list archive)
State Accepted
Commit d298761746d59ca169dfe68b4d0a983c3053573b
Delegated to: BPF
Headers show
Series [bpf-next] selftests/bpf: Define SYS_NANOSLEEP_KPROBE_NAME for aarch64 | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 9 maintainers not CCed: songliubraving@fb.com andrii@kernel.org shuah@kernel.org netdev@vger.kernel.org kafai@fb.com linux-kselftest@vger.kernel.org yhs@fb.com john.fastabend@gmail.com kpsingh@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-PR success PR summary

Commit Message

Ilya Leoshkevich April 4, 2022, 2:21 p.m. UTC
attach_probe selftest fails on aarch64 with `failed to create kprobe
'sys_nanosleep+0x0' perf event: No such file or directory`. This is
because, like on several other architectures, nanosleep has a prefix.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 tools/testing/selftests/bpf/test_progs.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alan Maguire April 4, 2022, 5:11 p.m. UTC | #1
On Mon, 4 Apr 2022, Ilya Leoshkevich wrote:

> attach_probe selftest fails on aarch64 with `failed to create kprobe
> 'sys_nanosleep+0x0' perf event: No such file or directory`. This is
> because, like on several other architectures, nanosleep has a prefix.
> 
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>

Thanks for adding this! I'm seeing a clean test pass on aarch64 now:

Tested-by: Alan Maguire <alan.maguire@oracle.com>

> ---
>  tools/testing/selftests/bpf/test_progs.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
> index 93c1ff705533..eec4c7385b14 100644
> --- a/tools/testing/selftests/bpf/test_progs.h
> +++ b/tools/testing/selftests/bpf/test_progs.h
> @@ -332,6 +332,8 @@ int trigger_module_test_write(int write_sz);
>  #define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep"
>  #elif defined(__s390x__)
>  #define SYS_NANOSLEEP_KPROBE_NAME "__s390x_sys_nanosleep"
> +#elif defined(__aarch64__)
> +#define SYS_NANOSLEEP_KPROBE_NAME "__arm64_sys_nanosleep"
>  #else
>  #define SYS_NANOSLEEP_KPROBE_NAME "sys_nanosleep"
>  #endif
> -- 
> 2.35.1
> 
>
patchwork-bot+netdevbpf@kernel.org April 4, 2022, 10 p.m. UTC | #2
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Mon,  4 Apr 2022 16:21:01 +0200 you wrote:
> attach_probe selftest fails on aarch64 with `failed to create kprobe
> 'sys_nanosleep+0x0' perf event: No such file or directory`. This is
> because, like on several other architectures, nanosleep has a prefix.
> 
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  tools/testing/selftests/bpf/test_progs.h | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [bpf-next] selftests/bpf: Define SYS_NANOSLEEP_KPROBE_NAME for aarch64
    https://git.kernel.org/bpf/bpf-next/c/d298761746d5

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index 93c1ff705533..eec4c7385b14 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -332,6 +332,8 @@  int trigger_module_test_write(int write_sz);
 #define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep"
 #elif defined(__s390x__)
 #define SYS_NANOSLEEP_KPROBE_NAME "__s390x_sys_nanosleep"
+#elif defined(__aarch64__)
+#define SYS_NANOSLEEP_KPROBE_NAME "__arm64_sys_nanosleep"
 #else
 #define SYS_NANOSLEEP_KPROBE_NAME "sys_nanosleep"
 #endif