selftests/bpf: Introduce __load_if_JITed annotation for tests
authorJiayuan Chen <mrpre@163.com>
Fri, 14 Feb 2025 09:18:22 +0000 (17:18 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Feb 2025 03:55:15 +0000 (19:55 -0800)
commitb38c72ab808c5657b5411a47cc6eb4912e8b4824
treefcc12acd2c4b94386c26076b1dc0d1568efaf6de
parent6ebc5030e0c5a698f1dd9a6684cddf6ccaed64a0
selftests/bpf: Introduce __load_if_JITed annotation for tests

In some cases, the verification logic under the interpreter and JIT
differs, such as may_goto, and the test program behaves differently under
different runtime modes, requiring separate verification logic for each
result.

Introduce __load_if_JITed and __load_if_no_JITed annotation for tests.

Signed-off-by: Jiayuan Chen <mrpre@163.com>
Link: https://lore.kernel.org/r/20250214091823.46042-3-mrpre@163.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/bpf_misc.h
tools/testing/selftests/bpf/test_loader.c