]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: add btf_dedup test for VOID equivalence check
authorAndrii Nakryiko <andriin@fb.com>
Wed, 27 Mar 2019 05:00:07 +0000 (22:00 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 27 Mar 2019 15:01:25 +0000 (08:01 -0700)
commit1d04071875fd0219963a8e8f985434f71061b98f
treef8856c7d8beb7af4e1f48b0d29f81ddff7389ece
parentd69c8e510d97cfdf4869194277d9c3c1b2fa2bda
selftests/bpf: add btf_dedup test for VOID equivalence check

This patch adds specific test exposing bug in btf_dedup_is_equiv() when
comparing candidate VOID type to a non-VOID canonical type. It's
important for canonical type to be anonymous, otherwise name equality
check will do the right thing and will exit early.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_btf.c