diff options
author | Hengqi Chen <hengqi.chen@gmail.com> | 2022-02-07 22:31:34 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-02-08 21:45:06 -0800 |
commit | c28748233b4736bd31b3d3c3011d42054cc738f5 (patch) | |
tree | 67f2081ee7aa77a5add2eb541a8e87293b504f18 /tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c | |
parent | 816ae109554756ce5e22e3aabde10161c4d0a4f7 (diff) | |
download | linux-c28748233b4736bd31b3d3c3011d42054cc738f5.tar.gz linux-c28748233b4736bd31b3d3c3011d42054cc738f5.tar.bz2 linux-c28748233b4736bd31b3d3c3011d42054cc738f5.zip |
selftests/bpf: Test BPF_KPROBE_SYSCALL macro
Add tests for the newly added BPF_KPROBE_SYSCALL macro.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220207143134.2977852-3-hengqi.chen@gmail.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 | 6 |
1 files changed, 6 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 8bc58bda500d..c381faaae741 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 @@ -62,6 +62,12 @@ void test_bpf_syscall_macro(void) ASSERT_EQ(skel->bss->arg4_core, exp_arg4, "syscall_arg4_core_variant"); ASSERT_EQ(skel->bss->arg5_core, exp_arg5, "syscall_arg5_core_variant"); + ASSERT_EQ(skel->bss->option_syscall, exp_arg1, "BPF_KPROBE_SYSCALL_option"); + ASSERT_EQ(skel->bss->arg2_syscall, exp_arg2, "BPF_KPROBE_SYSCALL_arg2"); + ASSERT_EQ(skel->bss->arg3_syscall, exp_arg3, "BPF_KPROBE_SYSCALL_arg3"); + ASSERT_EQ(skel->bss->arg4_syscall, exp_arg4, "BPF_KPROBE_SYSCALL_arg4"); + ASSERT_EQ(skel->bss->arg5_syscall, exp_arg5, "BPF_KPROBE_SYSCALL_arg5"); + cleanup: bpf_syscall_macro__destroy(skel); } |