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)
commiteed7818adf03e874994b966aa33bc00204dd275a
tree0134a65b8aed1982edac479c6edc59e9e8da5a51
parent44ad23dfbccbcd26d6ca504eba1ac55755864969
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