]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftests/bpf: Add test for d_path helper
authorJiri Olsa <jolsa@kernel.org>
Tue, 25 Aug 2020 19:21:23 +0000 (21:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Aug 2020 22:41:15 +0000 (15:41 -0700)
commite4d1af4b16f80a90d9cf3a09bee2012dcde45638
treec81a467dd57c7d30acbe937fa2d07353987dc3ce
parent762f85156835258c85a32bf81b283300b6c6bd17
selftests/bpf: Add test for d_path helper

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.

The test is doing fstat/close on several fd types,
and verifies we got the d_path helper working on
kernel probes for vfs_getattr/filp_close functions.

Original-patch-by: Wenbo Zhang <ethercflow@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200825192124.710397-14-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/d_path.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_d_path.c [new file with mode: 0644]