linux-stable/tools/testing
Andrii Nakryiko 14137f3c62 selftests/bpf: Pass all BPF .o's through BPF static linker
Pass all individual BPF object files (generated from progs/*.c) through
`bpftool gen object` command to validate that BPF static linker doesn't
corrupt them.

As an additional sanity checks, validate that passing resulting object files
through linker again results in identical ELF files. Exact same ELF contents
can be guaranteed only after two passes, as after the first pass ELF sections
order changes, and thus .BTF.ext data sections order changes. That, in turn,
means that strings are added into the final BTF string sections in different
order, so .BTF strings data might not be exactly the same. But doing another
round of linking afterwards should result in the identical ELF file, which is
checked with additional `diff` command.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210318194036.3521577-12-andrii@kernel.org
2021-03-18 16:14:23 -07:00
..
fault-injection
ktest Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
kunit kunit: tool: fix unintentional statefulness in run_kernel() 2021-02-08 16:10:22 -07:00
nvdimm ndtest: Add papr health related flags 2021-01-28 00:22:49 -08:00
radix-tree ida: Free allocated bitmap in error path 2020-10-07 09:11:33 -04:00
scatterlist tools/testing/scatterlist: Fix overflow of max segment size 2021-01-28 15:17:39 -04:00
selftests selftests/bpf: Pass all BPF .o's through BPF static linker 2021-03-18 16:14:23 -07:00
vsock