OSDN Git Service

selftests/bpf: Add helpers for getting socket family & type name
authorJakub Sitnicki <jakub@cloudflare.com>
Thu, 12 Dec 2019 10:22:53 +0000 (11:22 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Dec 2019 20:38:00 +0000 (12:38 -0800)
commita9ce4cf4e47c55ab40641b92551bc9e1de4bfa61
treef8040169492f470614b2e963c386ca339601d763
parent11f80355d4d27c7c798fc9890b4056c5d98af992
selftests/bpf: Add helpers for getting socket family & type name

Having string arrays to map socket family & type to a name prevents us from
unrolling the test runner loop in the subsequent patch. Introduce helpers
that do the same thing.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191212102259.418536-5-jakub@cloudflare.com
tools/testing/selftests/bpf/test_select_reuseport.c