bpf: Test for bpf ID
authorMartin KaFai Lau <kafai@fb.com>
Mon, 5 Jun 2017 19:15:53 +0000 (12:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jun 2017 19:41:24 +0000 (15:41 -0400)
commit95b9afd3987f91c09151158279e165276a95c597
treef71901b7ceeebc924ad0c68184f4cd4f96511c7c
parent1e270976908686ec25fb91b8a34145be54137976
bpf: Test for bpf ID

Add test to exercise the bpf_prog/map id generation,
bpf_(prog|map)_get_next_id(), bpf_(prog|map)_get_fd_by_id() and
bpf_get_obj_info_by_fd().

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/include/uapi/linux/bpf.h
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_obj_id.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_progs.c