]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: fix btf_dedup testing code
authorAndrii Nakryiko <andriin@fb.com>
Thu, 28 Feb 2019 23:31:21 +0000 (15:31 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Mar 2019 00:31:47 +0000 (01:31 +0100)
commita8a7736e797cb27fd96fe67d9c3b57128a6bc8fb
treeb3c8c179f0c48a9592c5c3e5d3d72a23f60f81ae
parent99bb48dbc49281a7039d15d07ef3f3a9b6975e15
selftests/bpf: fix btf_dedup testing code

btf_dedup testing code doesn't account for length of struct btf_header
when calculating the start of a string section. This patch fixes this
problem.

Fixes: b4035b1fcf60 ("tools/bpf: remove btf__get_strings() superseded by raw data API")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/test_btf.c