selftests/bpf: Add a series of tests for bpf_snprintf

The "positive" part tests all format specifiers when things go well.

The "negative" part makes sure that incorrect format strings fail at
load time.

Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210419155243.1632274-7-revest@chromium.org
This commit is contained in:
Florent Revest 2021-04-19 17:52:43 +02:00 • committed by Alexei Starovoitov
commit c2e39c6bdc
3 changed files with 218 additions and 0 deletions