Thread (28 messages) 28 messages, 4 authors, 2020-06-02

Re: [PATCH 8/9] selftests/bpf: Add test for d_path helper

From: Andrii Nakryiko <hidden>
Date: 2020-05-14 22:48:33
Also in: bpf

On Wed, May 6, 2020 at 6:32 AM Jiri Olsa [off-list ref] wrote:
Adding test for d_path helper which is pretty much
copied from Wenbo Zhang's test for bpf_get_fd_path,
which never made it in.

I've failed so far to compile the test with <linux/fs.h>
kernel header, so for now adding 'struct file' with f_path
member that has same offset as kernel's file object.
Switch to using vmlinux.h? It would also be nice to use skeletons
instead of bpf_object__xxx API.
Original-patch-by: Wenbo Zhang [off-list ref]
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 .../testing/selftests/bpf/prog_tests/d_path.c | 196 ++++++++++++++++++
 .../testing/selftests/bpf/progs/test_d_path.c |  71 +++++++
 2 files changed, 267 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/d_path.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_d_path.c
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help