selftests/bpf: Add variable-length data concatenation pattern test

Add selftest that validates variable-length data reading and concatentation
with one big shared data array. This is a common pattern in production use for
monitoring and tracing applications, that potentially can read a lot of data,
but overall read much less. Such pattern allows to determine precisely what
amount of data needs to be sent over perfbuf/ringbuf and maximize efficiency.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200623032224.4020118-2-andriin@fb.com
This commit is contained in:
Andrii Nakryiko 2020-06-22 20:22:22 -07:00 • committed by Daniel Borkmann
commit 5e85c6bb8e
2 changed files with 152 additions and 0 deletions