Skip to content

Commit f83fcec

Browse files
olsajiriAlexei Starovoitov
authored andcommitted
selftests/bpf: Fix open-coded gettid syscall in uprobe syscall tests
Commit 0e2fb01 ("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: 0e2fb01 ("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>
1 parent d347921 commit f83fcec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static void *worker_trigger(void *arg)
661661
rounds++;
662662
}
663663

664-
printf("tid %d trigger rounds: %lu\n", gettid(), rounds);
664+
printf("tid %ld trigger rounds: %lu\n", sys_gettid(), rounds);
665665
return NULL;
666666
}
667667

@@ -704,7 +704,7 @@ static void *worker_attach(void *arg)
704704
rounds++;
705705
}
706706

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);
708708
uprobe_syscall_executed__destroy(skel);
709709
free(ref);
710710
return NULL;

0 commit comments

Comments
 (0)