bpf: Refactor BTF encoding macro to test_btf.h
authorMartin KaFai Lau <kafai@fb.com>
Fri, 26 Apr 2019 23:39:46 +0000 (16:39 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 27 Apr 2019 16:07:05 +0000 (09:07 -0700)
commit3f4d4c74101d60b88d23289bd4f5f6126c7235fc
tree66e9ffe057aa4888a9878033486b7a43a32f93f2
parenta19f89f3667c950ad13c1560e4abd8aa8526b6b1
bpf: Refactor BTF encoding macro to test_btf.h

Refactor common BTF encoding macros for other tests to use.
The libbpf may reuse some of them in the future  which requires
some more thoughts before publishing as a libbpf API.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_btf.c
tools/testing/selftests/bpf/test_btf.h [new file with mode: 0644]