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/map_tests | |
| parent | cb4158ce8ec8a5bb528cc1693356a5eb8058094d (diff) | |
| download | lwn-0e2fb011a0ba8e2258ce776fdf89fbd589c2a3a6.tar.gz lwn-0e2fb011a0ba8e2258ce776fdf89fbd589c2a3a6.zip | |
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/map_tests')
| -rw-r--r-- | tools/testing/selftests/bpf/map_tests/task_storage_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/map_tests/task_storage_map.c b/tools/testing/selftests/bpf/map_tests/task_storage_map.c index 7d050364efca..62971dbf2996 100644 --- a/tools/testing/selftests/bpf/map_tests/task_storage_map.c +++ b/tools/testing/selftests/bpf/map_tests/task_storage_map.c @@ -12,6 +12,7 @@ #include <bpf/bpf.h> #include <bpf/libbpf.h> +#include "bpf_util.h" #include "test_maps.h" #include "task_local_storage_helpers.h" #include "read_bpf_task_storage_busy.skel.h" @@ -115,7 +116,7 @@ void test_task_storage_map_stress_lookup(void) CHECK(err, "attach", "error %d\n", err); /* Trigger program */ - syscall(SYS_gettid); + sys_gettid(); skel->bss->pid = 0; CHECK(skel->bss->busy != 0, "bad bpf_task_storage_busy", "got %d\n", skel->bss->busy); |
