]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Add more BPF_END byte order conversion tests
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:40 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:29 +0000 (09:26 +0200)
commitaacd7e08375d8fabd6697372d044f18a76520b6a
tree514fbff805632ee326ad383ad0202a07b0aa2b90
parent578372c76cfc572ff138b400a74ea9a4f6a793a9
bpf/tests: Add more BPF_END byte order conversion tests

This patch adds tests of the high 32 bits of 64-bit BPF_END conversions.

It also adds a mirrored set of tests where the source bytes are reversed.
The MSB of each byte is now set on the high word instead, possibly
affecting sign-extension during conversion in a different way. Mainly
for JIT testing.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210914091842.4186267-13-johan.almbladh@anyfinetworks.com
lib/test_bpf.c