]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaef5f10f7cddd7755c5faaebbc3c3ec822d134ff
tree90562fef4f4ea13469bed6d53d52fc021014b6a6
parentc44e0f1e8e4af881dafb9fceb1e99d684bb410ac
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]