selftests/bpf: Add test validating data section to struct convertion layout
authorAndrii Nakryiko <andriin@fb.com>
Sat, 14 Dec 2019 01:43:40 +0000 (17:43 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 15 Dec 2019 23:58:05 +0000 (15:58 -0800)
commit197448eaac1ab330fb485769bccb62346ba1f458
tree90562fef4f4ea13469bed6d53d52fc021014b6a6
parentdde53c1b763b5038545efa5d812758ce589654e1
selftests/bpf: Add test validating data section to struct convertion layout

Add a simple selftests validating datasection-to-struct layour dumping. Global
variables are constructed in such a way as to cause both natural and
artificial padding (through custom alignment requirement).

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20191214014341.3442258-17-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/skeleton.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_skeleton.c [new file with mode: 0644]