Re: [PATCH bpf-next v4 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-16 Thread Florent Revest
On Fri, Apr 16, 2021 at 1:20 AM Andrii Nakryiko wrote: > > On Wed, Apr 14, 2021 at 11:54 AM Florent Revest wrote: > > +/* Loads an eBPF object calling bpf_snprintf with up to 10 characters of > > fmt */ > > +static int load_single_snprintf(char *fmt) > > +{ > > + struct

Re: [PATCH bpf-next v4 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-15 Thread Andrii Nakryiko
On Wed, Apr 14, 2021 at 11:54 AM Florent Revest wrote: > > 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 > --- > .../selftests/bpf/prog_tests/snprintf.c

[PATCH bpf-next v4 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-14 Thread Florent Revest
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 --- .../selftests/bpf/prog_tests/snprintf.c | 124 ++ .../selftests/bpf/progs/test_snprintf.c