Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Fix open-coded gettid syscall in uprobe syscall tests

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.

The uprobe syscall tests got in from tip tree, using sys_gettid in there.

Fixes: 0e2fb011a0ba ("selftests/bpf: Clean up open-coded gettid syscall invocations")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Jiri Olsa and committed by
Alexei Starovoitov
f83fcec7 d3479214

+2 -2
+2 -2
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
··· 661 661 rounds++; 662 662 } 663 663 664 - printf("tid %d trigger rounds: %lu\n", gettid(), rounds); 664 + printf("tid %ld trigger rounds: %lu\n", sys_gettid(), rounds); 665 665 return NULL; 666 666 } 667 667 ··· 704 704 rounds++; 705 705 } 706 706 707 - printf("tid %d attach rounds: %lu hits: %d\n", gettid(), rounds, skel->bss->executed); 707 + printf("tid %ld attach rounds: %lu hits: %d\n", sys_gettid(), rounds, skel->bss->executed); 708 708 uprobe_syscall_executed__destroy(skel); 709 709 free(ref); 710 710 return NULL;