OSDN Git Service

bpf/tests: Expand branch conversion JIT test
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:39 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:28 +0000 (09:26 +0200)
commitf1517eb790f97c1326016eb164a33a64d4d4fb7a
tree2062e18f9230d359796237202f851908f028157c
parentc4df4559db8447cdae15254a713f7fd5d4cee3ab
bpf/tests: Expand branch conversion JIT test

This patch expands the branch conversion test introduced by 66e5eb84
("bpf, tests: Add branch conversion JIT test"). The test now includes
a JMP with maximum eBPF offset. This triggers branch conversion for the
64-bit MIPS JIT. Additional variants are also added for cases when the
branch is taken or not taken.

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-12-johan.almbladh@anyfinetworks.com
lib/test_bpf.c