Re: [PATCH 8/9] selftests/bpf: Add test for d_path helper
From: Jiri Olsa <hidden>
Date: 2020-05-15 14:57:39
Also in:
bpf
From: Jiri Olsa <hidden>
Date: 2020-05-15 14:57:39
Also in:
bpf
On Thu, May 14, 2020 at 03:48:20PM -0700, Andrii Nakryiko wrote:
On Wed, May 6, 2020 at 6:32 AM Jiri Olsa [off-list ref] wrote:quoted
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.
I just spot it this week when checking for something else.. yep, nice ;-) thanks, jirka
quoted
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[...]