selftests/bpf: verify jset handling in CFG computation
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 13 Jun 2025 17:53:31 +0000 (10:53 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Jun 2025 18:51:19 +0000 (11:51 -0700)
commit4a4b84ba9e453295c746d81cb245c0c5d80050f0
tree19208d1580583c4f1f43f31ca700876eab2ad18e
parent3157f7e2999616ac91f4d559a8566214f74000a5
selftests/bpf: verify jset handling in CFG computation

A test case to check if both branches of jset are explored when
computing program CFG.

At 'if r1 & 0x7 ...':
- register 'r2' is computed alive only if jump branch of jset
  instruction is followed;
- register 'r0' is computed alive only if fallthrough branch of jset
  instruction is followed.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250613175331.3238739-2-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/compute_live_registers.c