selftests/bpf: test_progs/sockopt_sk: Convert to use BPF skeleton
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Thu, 8 Apr 2021 06:13:03 +0000 (09:13 +0300)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 9 Apr 2021 06:54:47 +0000 (23:54 -0700)
commitcad99cce133dd5377f22da1e75d7eb5c4b886d75
tree2f20219f033b40ba6455b5d4748bcee02c805b9c
parentff182bc572cec4ca757775bf2a33a3ce8611227a
selftests/bpf: test_progs/sockopt_sk: Convert to use BPF skeleton

Switch the test to use BPF skeleton to save some boilerplate and
make it easy to access bpf program bss segment.

The latter will be used to pass PAGE_SIZE from userspace since there
is no convenient way for bpf program to get it from inside of the
kernel.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210408061310.95877-2-yauheni.kaliuta@redhat.com
tools/testing/selftests/bpf/prog_tests/sockopt_sk.c