selftests/bpf: Fix trampoline_count clean up logic
authorAndrii Nakryiko <andriin@fb.com>
Thu, 20 Feb 2020 23:05:46 +0000 (15:05 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Feb 2020 02:03:10 +0000 (18:03 -0800)
commit006ed53e8caa0b3c1e21a51dc34d6b3b5ab0aab6
treef2f6b1b8ea77194883a9355f10c11689d116e315
parent2c3a368127e1b56b32e147971ab804176ff4c9f3
selftests/bpf: Fix trampoline_count clean up logic

Libbpf's Travis CI tests caught this issue. Ensure bpf_link and bpf_object
clean up is performed correctly.

Fixes: d633d57902a5 ("selftest/bpf: Add test for allowed trampolines count")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20200220230546.769250-1-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/trampoline_count.c