Commit 18e76c44 authored by Eduard Zingerman's avatar Eduard Zingerman Committed by sanglipeng
Browse files

selftests/bpf: Test btf dump for struct with padding only fields

stable inclusion
from stable-v5.10.177
commit b9f7422dd94a6ec5572a3e895157ec1dad2952a7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b9f7422dd94a6ec5572a3e895157ec1dad2952a7



--------------------------------

[ Upstream commit d503f117 ]

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: default avatarEduard Zingerman <eddyz87@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221001104425.415768-2-eddyz87@gmail.com


Stable-dep-of: ea2ce1ba ("libbpf: Fix BTF-to-C converter's padding logic")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent c3c66518
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment