Commit e1d79454 authored by Harishankar Vishwanathan's avatar Harishankar Vishwanathan Committed by Alexei Starovoitov
Browse files

selftests/bpf: Add testcases for BPF_ADD and BPF_SUB



The previous commit improves the precision in scalar(32)_min_max_add,
and scalar(32)_min_max_sub. The improvement in precision occurs in cases
when all outcomes overflow or underflow, respectively.

This commit adds selftests that exercise those cases.

This commit also adds selftests for cases where the output register
state bounds for u(32)_min/u(32)_max are conservatively set to unbounded
(when there is partial overflow or underflow).

Signed-off-by: default avatarHarishankar Vishwanathan <harishankar.vishwanathan@gmail.com>
Co-developed-by: default avatarMatan Shachnai <m.shachnai@rutgers.edu>
Signed-off-by: default avatarMatan Shachnai <m.shachnai@rutgers.edu>
Suggested-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250623040359.343235-3-harishankar.vishwanathan@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 7a998a73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment