selftests/bpf: More open-coded gettid syscall cleanup
authorAlan Maguire <alan.maguire@oracle.com>
Thu, 11 Sep 2025 16:30:56 +0000 (17:30 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 15 Sep 2025 18:39:24 +0000 (20:39 +0200)
commit3ae4c527080ce81b889ffc2780e077770b95ae88
treea3e122290086991e91cb42d8b945b71d8adae82f
parent61ee2cce3fe4a006c600069c726dc36d54256765
selftests/bpf: More open-coded gettid syscall cleanup

Commit 0e2fb011a0ba ("selftests/bpf: Clean up open-coded gettid syscall
invocations") addressed the issue that older libc may not have a gettid()
function call wrapper for the associated syscall.

A few more instances have crept into tests, use sys_gettid() instead, and
poison raw gettid() usage to avoid future issues.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20250911163056.543071-1-alan.maguire@oracle.com
tools/testing/selftests/bpf/bpf_util.h
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/prog_tests/cgroup_xattr.c
tools/testing/selftests/bpf/prog_tests/kernel_flag.c
tools/testing/selftests/bpf/prog_tests/task_local_data.h
tools/testing/selftests/bpf/prog_tests/test_task_local_data.c