diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2024-11-04 09:19:58 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-11-04 11:37:36 -0800 |
commit | 0e2fb011a0ba8e2258ce776fdf89fbd589c2a3a6 (patch) | |
tree | 488625a37ae71db0d4d69780c84a2bd077e053dd /tools/testing/selftests/bpf/prog_tests/linked_funcs.c | |
parent | cb4158ce8ec8a5bb528cc1693356a5eb8058094d (diff) |
selftests/bpf: Clean up open-coded gettid syscall invocations
Availability of the gettid definition across glibc versions supported by
BPF selftests is not certain. Currently, all users in the tree open-code
syscall to gettid. Convert them to a common macro definition.
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241104171959.2938862-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/linked_funcs.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/linked_funcs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/linked_funcs.c b/tools/testing/selftests/bpf/prog_tests/linked_funcs.c index cad664546912..fa639b021f7e 100644 --- a/tools/testing/selftests/bpf/prog_tests/linked_funcs.c +++ b/tools/testing/selftests/bpf/prog_tests/linked_funcs.c @@ -20,7 +20,7 @@ void test_linked_funcs(void) bpf_program__set_autoload(skel->progs.handler1, true); bpf_program__set_autoload(skel->progs.handler2, true); - skel->rodata->my_tid = syscall(SYS_gettid); + skel->rodata->my_tid = sys_gettid(); skel->bss->syscall_id = SYS_getpgid; err = linked_funcs__load(skel); |