bpf/tests: Add staggered JMP and JMP32 tests
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:34 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:28 +0000 (09:26 +0200)
commita7d2e752e52050fcdf0c50cf343488891a8efd5b
tree639801f577f372b010a71cddea541a451ac4bf7f
parenta5a36544de38057b8e8de8fb6b2bcd9c102640f4
bpf/tests: Add staggered JMP and JMP32 tests

This patch adds a new type of jump test where the program jumps forwards
and backwards with increasing offset. It mainly tests JITs where a
relative jump may generate different JITed code depending on the offset
size, read MIPS.

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