On Tue, Sep 14, 2021 at 12:39 PM Yonghong Song <yhs@xxxxxx> wrote: > > > > On 9/13/21 10:38 PM, Andrii Nakryiko wrote: > > On Mon, Sep 13, 2021 at 8:52 AM Yonghong Song <yhs@xxxxxx> wrote: > >> > >> Add unit tests for BTF_KIND_TAG deduplication for > >> - struct and struct member > >> - variable > >> - func and func argument > >> > > > > Can you please also add tests where you have duplicated struct, > > variable, and func (three different tests), and each copy has two > > currently, variable won't be deduplicated so I will skip variable > and add tests for func/argument and struct/member. oh, right, yeap, it makes sense only for struct/union and func > > > tags: one with common value (e.g., common_val) and one with unique > > value (uniq_val1 and uniq_val2, one for each copy of a > > struct/var/func). End result should be a single struct/var/func with > > three different tags pointing to it (e.g., common_val, uniq_val1, > > uniq_val2). I.e., those tags are "inherited" by the deduplicated > > entity and only a unique set of them is left. > > > >> Signed-off-by: Yonghong Song <yhs@xxxxxx> > >> --- > >> tools/testing/selftests/bpf/prog_tests/btf.c | 91 ++++++++++++++++---- > >> 1 file changed, 74 insertions(+), 17 deletions(-) > >> > > > > [...] > >