On Thu, May 14, 2020 at 03:48:20PM -0700, Andrii Nakryiko wrote: > On Wed, May 6, 2020 at 6:32 AM Jiri Olsa <jolsa@xxxxxxxxxx> 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. I just spot it this week when checking for something else.. yep, nice ;-) thanks, jirka > > > Original-patch-by: Wenbo Zhang <ethercflow@xxxxxxxxx> > > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx> > > --- > > .../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 > > > > [...] >