Commit f83fcec7 authored by Jiri Olsa's avatar Jiri Olsa Committed by Alexei Starovoitov
Browse files

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



Commit 0e2fb011 ("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: 0e2fb011 ("selftests/bpf: Clean up open-coded gettid syscall invocations")
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent d3479214
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ static void *worker_trigger(void *arg)
		rounds++;
	}

	printf("tid %d trigger rounds: %lu\n", gettid(), rounds);
	printf("tid %ld trigger rounds: %lu\n", sys_gettid(), rounds);
	return NULL;
}

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

	printf("tid %d attach rounds: %lu hits: %d\n", gettid(), rounds, skel->bss->executed);
	printf("tid %ld attach rounds: %lu hits: %d\n", sys_gettid(), rounds, skel->bss->executed);
	uprobe_syscall_executed__destroy(skel);
	free(ref);
	return NULL;