selftests/bpf: ringbuf: Use runtime page size
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Thu, 8 Apr 2021 06:13:07 +0000 (09:13 +0300)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 9 Apr 2021 06:54:48 +0000 (23:54 -0700)
commit23a65766066bb6e42a44e9097ddf79f72292a19f
tree8891e681c6c5d4986f8e49dd507ffd55d0f8e147
parent34090aaf256e469a39401cc04d5cd43275ccd97d
selftests/bpf: ringbuf: Use runtime page size

Replace hardcoded 4096 with runtime value in the userspace part of
the test and set bpf table sizes dynamically according to the value.

Do not switch to ASSERT macros, keep CHECK, for consistency with the
rest of the test. Can be a separate cleanup patch.

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-6-yauheni.kaliuta@redhat.com
tools/testing/selftests/bpf/prog_tests/ringbuf.c
tools/testing/selftests/bpf/progs/test_ringbuf.c