selftests/bpf: Test btf dump for struct with padding only fields
authorEduard Zingerman <eddyz87@gmail.com>
Sat, 1 Oct 2022 10:44:25 +0000 (13:44 +0300)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 5 Oct 2022 22:27:08 +0000 (15:27 -0700)
commitd503f1176b14f722a40ea5110312614982f9a80b
treea37a9174f088ce5bcc995aa3d838401b3e96de64
parent44a726c3f23cf762ef4ce3c1709aefbcbe97f62c
selftests/bpf: Test btf dump for struct with padding only fields

Structures with zero regular fields but some padding constitute a
special case in btf_dump.c:btf_dump_emit_struct_def with regards to
newline before closing '}'.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221001104425.415768-2-eddyz87@gmail.com
tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c