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)
commiteb76899ce749507e09cad6816f32cede14a9b7ee
treef8856c7d8beb7af4e1f48b0d29f81ddff7389ece
parent9ec71c1cdbdd6c4ac0150a51d64e06c5d1bd207e
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