diff options
author | 2022-02-09 03:17:42 +0100 | |
---|---|---|
committer | 2022-02-08 21:37:41 -0800 | |
commit | 9e45a377f29b5a66f75c0c3a0d84ad5c583290e8 (patch) | |
tree | 7dbdf5b4157881345223d646f26e0444298e0d21 /tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c | |
parent | libbpf: Fix accessing syscall arguments on riscv (diff) | |
download | linux-9e45a377f29b5a66f75c0c3a0d84ad5c583290e8.tar.gz linux-9e45a377f29b5a66f75c0c3a0d84ad5c583290e8.tar.bz2 linux-9e45a377f29b5a66f75c0c3a0d84ad5c583290e8.zip |
selftests/bpf: Skip test_bpf_syscall_macro's syscall_arg1 on arm64 and s390
These architectures can provide access to the first syscall argument
only through PT_REGS_PARM1_CORE_SYSCALL().
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220209021745.2215452-8-iii@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c b/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c index f5f4c8adf539..8bc58bda500d 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c @@ -33,7 +33,11 @@ void test_bpf_syscall_macro(void) /* check whether args of syscall are copied correctly */ prctl(exp_arg1, exp_arg2, exp_arg3, exp_arg4, exp_arg5); +#if defined(__aarch64__) || defined(__s390__) + ASSERT_NEQ(skel->bss->arg1, exp_arg1, "syscall_arg1"); +#else ASSERT_EQ(skel->bss->arg1, exp_arg1, "syscall_arg1"); +#endif ASSERT_EQ(skel->bss->arg2, exp_arg2, "syscall_arg2"); ASSERT_EQ(skel->bss->arg3, exp_arg3, "syscall_arg3"); /* it cannot copy arg4 when uses PT_REGS_PARM4 on x86_64 */ |