mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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>
This commit is contained in:
committed by
Alexei Starovoitov
parent
cb4158ce8e
commit
0e2fb011a0
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user