selftests/bpf: Adopt attach_probe selftest to work on old kernels
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 21 Sep 2021 21:00:34 +0000 (14:00 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 22 Sep 2021 02:40:09 +0000 (19:40 -0700)
commitd3b0e3b03cf75896de7b03ad1fca2bff98c59f15
treeb4044bc128e8efacb2420cfc4b5fe4e8c63a61f2
parent303a257223a3bbd7cc6ccc2b7777179c8d9f3989
selftests/bpf: Adopt attach_probe selftest to work on old kernels

Make sure to not use ref_ctr_off feature when running on old kernels
that don't support this feature. This allows to test libbpf's legacy
kprobe and uprobe logic on old kernels.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210921210036.1545557-3-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/attach_probe.c