]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
selftests/bpf: Test refinement of single-value tnum
authorPaul Chaignon <paul.chaignon@gmail.com>
Fri, 27 Feb 2026 21:36:30 +0000 (22:36 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Feb 2026 00:11:50 +0000 (16:11 -0800)
commite6ad477d1bf8829973cddd9accbafa9d1a6cd15a
tree7fd0eeb18eb7146315c451a03b94623e771dcc0f
parentefc11a667878a1d655ff034a93a539debbfedb12
selftests/bpf: Test refinement of single-value tnum

This patch introduces selftests to cover the new bounds refinement
logic introduced in the previous patch. Without the previous patch,
the first two tests fail because of the invariant violation they
trigger. The last test fails because the R10 access is not detected as
dead code. In addition, all three tests fail because of R0 having a
non-constant value in the verifier logs.

In addition, the last two cases are covering the negative cases: when we
shouldn't refine the bounds because the u64 and tnum overlap in at least
two values.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/90d880c8cf587b9f7dc715d8961cd1b8111d01a8.1772225741.git.paul.chaignon@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_bounds.c