diff options
author | Jiri Olsa <jolsa@redhat.com> | 2021-07-21 23:58:09 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-07-22 20:09:16 -0700 |
commit | e3f9bc35ea7e9871667d7f769cf0079211828e89 (patch) | |
tree | ad75453ffd707488d850db04610ec0a7fc79844f /tools/testing/selftests/bpf/prog_tests | |
parent | 1f71a468a75ff4f13c55966c74284aa4a6bcc334 (diff) | |
download | linux-e3f9bc35ea7e9871667d7f769cf0079211828e89.tar.bz2 |
libbpf: Allow decimal offset for kprobes
Allow to specify decimal offset in SEC macro, like:
SEC("kprobe/bpf_fentry_test7+5")
Add selftest for that.
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20210721215810.889975-3-jolsa@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c b/tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c index 088b3653610d..02a465f36d59 100644 --- a/tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c +++ b/tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c @@ -17,6 +17,7 @@ void test_get_func_ip_test(void) */ #ifndef __x86_64__ bpf_program__set_autoload(skel->progs.test6, false); + bpf_program__set_autoload(skel->progs.test7, false); #endif err = get_func_ip_test__load(skel); @@ -46,6 +47,7 @@ void test_get_func_ip_test(void) ASSERT_EQ(skel->bss->test5_result, 1, "test5_result"); #ifdef __x86_64__ ASSERT_EQ(skel->bss->test6_result, 1, "test6_result"); + ASSERT_EQ(skel->bss->test7_result, 1, "test7_result"); #endif cleanup: |