selftests/bpf: Add file_build_id test

The test attaches bpf program to sched_process_exec tracepoint
and gets build of executed file from bprm->file object.

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>
5 files changed