]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: btf: Add tests for the btf uapi changes
authorMartin KaFai Lau <kafai@fb.com>
Tue, 22 May 2018 22:04:24 +0000 (15:04 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 23 May 2018 10:03:32 +0000 (12:03 +0200)
commit1994f041579c0a220153d0479a4e9663e29405cb
tree10cf3d584e25f564d0cbc3653eb428dd21962f1d
parent93f0227361b64b6b5b32e6c088ccb1ed33db8ff1
bpf: btf: Add tests for the btf uapi changes

This patch does the followings:
1. Modify libbpf and test_btf to reflect the uapi changes in btf
2. Add test for the btf_header changes
3. Add tests for array->index_type
4. Add err_str check to the tests
5. Fix a 4 bytes hole in "struct test #1" by swapping "m" and "n"

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/bpf.c
tools/lib/bpf/bpf.h
tools/lib/bpf/btf.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/testing/selftests/bpf/test_btf.c