[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErzpmt4ju_YhNm5CiZqDc_o12jOhMwDA0bNkP_ZoYUOJohhDg@mail.gmail.com>
Date: Thu, 23 Oct 2025 19:20:48 +0800
From: Donglin Peng <dolinux.peng@...il.com>
To: Eduard Zingerman <eddyz87@...il.com>
Cc: ast@...nel.org, linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
Andrii Nakryiko <andrii.nakryiko@...il.com>, Alan Maguire <alan.maguire@...cle.com>,
Song Liu <song@...nel.org>, pengdonglin <pengdonglin@...omi.com>
Subject: Re: [RFC PATCH v2 4/5] selftests/bpf: add tests for BTF deduplication
and sorting
On Wed, Oct 22, 2025 at 3:07 AM Eduard Zingerman <eddyz87@...il.com> wrote:
>
> On Mon, 2025-10-20 at 17:39 +0800, Donglin Peng wrote:
>
> [...]
>
> > +{
> > + .descr = "dedup_sort: strings deduplication",
> > + .input = {
> > + .raw_types = {
> > + BTF_TYPE_INT_ENC(NAME_NTH(1), BTF_INT_SIGNED, 0, 32, 4),
> > + BTF_TYPE_INT_ENC(NAME_NTH(2), BTF_INT_SIGNED, 0, 64, 8),
> > + BTF_TYPE_INT_ENC(NAME_NTH(3), BTF_INT_SIGNED, 0, 32, 4),
> > + BTF_TYPE_INT_ENC(NAME_NTH(4), BTF_INT_SIGNED, 0, 64, 8),
> > + BTF_TYPE_INT_ENC(NAME_NTH(5), BTF_INT_SIGNED, 0, 32, 4),
> > + BTF_END_RAW,
> > + },
> > + BTF_STR_SEC("\0int\0long int\0int\0long int\0int"),
> > + },
> > + .expect = {
> > + .raw_types = {
> > + BTF_TYPE_INT_ENC(NAME_NTH(1), BTF_INT_SIGNED, 0, 32, 4),
> > + BTF_TYPE_INT_ENC(NAME_NTH(2), BTF_INT_SIGNED, 0, 64, 8),
> > + BTF_END_RAW,
> > + },
> > + BTF_STR_SEC("\0int\0long int"),
> > + },
> > + .opts = {
> > + .sort_by_kind_name = true,
> > + },
> > +},
>
> I think that having so many tests for this feature is redundant.
> E.g. above strings handling test does not seem necessary,
> as btf__dedup_compact_and_sort_types() does not really change anything
> with regards to strings handling.
> I'd say that a single test including elements with and without names,
> and elements of different kind should suffice.
Thanks for the suggestion.
>
> [...]
Powered by blists - more mailing lists