"patch list: jump pushed out of range by patches" expects the load to fail with "insn %d cannot be patched due to 16-bit range". It matches only the fixed part of the message. Which insn the message names is what the patch list decides: the jump that got out of range, not the insn that a patch replaced. Match the whole message, with insn 2, the jump over the divisions. Fixes: 67d4d0b73c29 ("selftests/bpf: Test jumps around patched instructions") Reported-by: Alexei Starovoitov Closes: https://lore.kernel.org/bpf/DMKHZS5B5CNO.186F6YH1T6YU4@gmail.com/ Signed-off-by: Qiliang Yuan --- tools/testing/selftests/bpf/progs/verifier_patch_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/verifier_patch_list.c b/tools/testing/selftests/bpf/progs/verifier_patch_list.c index 3ba99cf16e96b..045081936d73d 100644 --- a/tools/testing/selftests/bpf/progs/verifier_patch_list.c +++ b/tools/testing/selftests/bpf/progs/verifier_patch_list.c @@ -128,7 +128,7 @@ __naked void patch_list_may_goto(void) */ SEC("raw_tp") __description("patch list: jump pushed out of range by patches") -__failure __msg("cannot be patched due to 16-bit range") +__failure __msg("insn 2 cannot be patched due to 16-bit range") __naked void patch_list_jump_out_of_range(void) { asm volatile (" \ -- 2.43.0