]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix btf_dump test cases on 32-bit arches
authorAndrii Nakryiko <andriin@fb.com>
Thu, 13 Aug 2020 20:49:41 +0000 (13:49 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Aug 2020 23:45:41 +0000 (16:45 -0700)
commitb86744a0e45a8a34a8ca58865d2d68088fed7d9b
tree0134a65b8aed1982edac479c6edc59e9e8da5a51
parentb0fea34250f0991899a6e3779986e8a8ecbb7f96
selftests/bpf: Fix btf_dump test cases on 32-bit arches

Fix btf_dump test cases by hard-coding BPF's pointer size of 8 bytes for cases
where it's impossible to deterimne the pointer size (no long type in BTF). In
cases where it's known, validate libbpf correctly determines it as 8.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200813204945.1020225-6-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/btf_dump.c