summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_btf_dump.c
AgeCommit message (Collapse)AuthorFilesLines
2019-08-21selftests/bpf: fix test_btf_dump with O=Ilya Leoshkevich1-0/+7
test_btf_dump fails when run with O=, because it needs to access source files and assumes they live in ./progs/, which is not the case in this scenario. Fix by instructing kselftest to copy btf_dump_test_case_*.c files to the test directory. Since kselftest does not preserve directory structure, adjust the test to look in ./progs/ and then in ./. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-05-25selftests/bpf: add btf_dump BTF-to-C conversion testsAndrii Nakryiko1-0/+143
Add new test_btf_dump set of tests, validating BTF-to-C conversion correctness. Tests rely on clang to generate BTF from provided C test cases. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>