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)
commit61746dbe1aa27c9e23293621665b8442dfed7698
tree10cf3d584e25f564d0cbc3653eb428dd21962f1d
parentf03b15d34bd805e57bf69523b4dca7af10e9eeb1
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