OSDN Git Service

selftests/bpf: Add bpf_snprintf_btf helper tests
authorAlan Maguire <alan.maguire@oracle.com>
Mon, 28 Sep 2020 11:31:06 +0000 (12:31 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Sep 2020 01:26:58 +0000 (18:26 -0700)
commit076a95f5aff2ce7299d1966dee06de2723554c24
treef364e94385281021257434b1b3cc95ca60b1d0c0
parentc4d0bfb45068d853a478b9067a95969b1886a30f
selftests/bpf: Add bpf_snprintf_btf helper tests

Tests verifying snprintf()ing of various data structures,
flags combinations using a tp_btf program. Tests are skipped
if __builtin_btf_type_id is not available to retrieve BTF
type ids.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1601292670-1616-5-git-send-email-alan.maguire@oracle.com
tools/testing/selftests/bpf/prog_tests/snprintf_btf.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/netif_receive_skb.c [new file with mode: 0644]