selftests/bpf: Use bpf_link__destroy in fill_link_info tests
authorJiri Olsa <jolsa@kernel.org>
Sat, 25 Nov 2023 19:31:28 +0000 (20:31 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 29 Nov 2023 05:50:09 +0000 (21:50 -0800)
commit1703612885723869064f18e8816c6f3f87987748
tree8fb956a4f362b70c73e4cd71d5b803bb1a5ec151
parente56fdbfb06e26a7066b070967badef4148528df2
selftests/bpf: Use bpf_link__destroy in fill_link_info tests

The fill_link_info test keeps skeleton open and just creates
various links. We are wrongly calling bpf_link__detach after
each test to close them, we need to call bpf_link__destroy.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Acked-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/bpf/20231125193130.834322-5-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/fill_link_info.c