lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCHv3 bpf-next 9/9] selftests/bpf: Add file_build_id test
On Thu, Mar 16, 2023 at 10:03 AM Jiri Olsa <jolsa@kernel.org> wrote:
>
> The test attaches bpf program to sched_process_exec tracepoint
> and gets build of executed file from bprm->file object.

typo: build ID

>
> We use urandom_read as the test program and in addition we also
> attach uprobe to liburandom_read.so:urandlib_read_without_sema
> and retrieve and check build id of that shared library.
>
> Also executing the no_build_id binary to verify the bpf program
> gets the error properly.
>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/testing/selftests/bpf/Makefile | 7 +-
> tools/testing/selftests/bpf/no_build_id.c | 6 ++
> .../selftests/bpf/prog_tests/file_build_id.c | 98 +++++++++++++++++++
> .../selftests/bpf/progs/file_build_id.c | 70 +++++++++++++
> tools/testing/selftests/bpf/test_progs.h | 10 ++
> 5 files changed, 190 insertions(+), 1 deletion(-)
> create mode 100644 tools/testing/selftests/bpf/no_build_id.c
> create mode 100644 tools/testing/selftests/bpf/prog_tests/file_build_id.c
> create mode 100644 tools/testing/selftests/bpf/progs/file_build_id.c
>

Looks good, but let's add CONFIG_FILE_BUILD_ID to
selftests/bpf/config, as Daniel mentioned.

Acked-by: Andrii Nakryiko <andrii@kernel.org>

[...]

\
 
 \ /
  Last update: 2023-03-27 01:04    [W:0.237 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site