From: Eduard Zingerman <eddyz87@gmail.com>
To: Donglin Peng <dolinux.peng@gmail.com>, ast@kernel.org
Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Alan Maguire <alan.maguire@oracle.com>,
Song Liu <song@kernel.org>, pengdonglin <pengdonglin@xiaomi.com>
Subject: Re: [RFC PATCH v2 4/5] selftests/bpf: add tests for BTF deduplication and sorting
Date: Tue, 21 Oct 2025 12:07:17 -0700 [thread overview]
Message-ID: <ec7ecc7d47540bba04f6a0b7e0cf74f4ef7a84bb.camel@gmail.com> (raw)
In-Reply-To: <20251020093941.548058-5-dolinux.peng@gmail.com>
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.
[...]
next prev parent reply other threads:[~2025-10-21 19:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 9:39 [RFC PATCH v2 0/5] Significantly Improve BTF Type Lookup Performance Donglin Peng
2025-10-20 9:39 ` [RFC PATCH v2 1/5] btf: search local BTF before base BTF Donglin Peng
2025-10-21 1:06 ` Eduard Zingerman
2025-10-21 8:31 ` Donglin Peng
2025-10-21 15:56 ` Eduard Zingerman
2025-10-22 3:08 ` Donglin Peng
2025-10-20 9:39 ` [RFC PATCH v2 2/5] btf: sort BTF types by kind and name to enable binary search Donglin Peng
2025-10-21 17:24 ` Alan Maguire
2025-10-22 4:47 ` Donglin Peng
2025-10-21 18:59 ` Eduard Zingerman
2025-10-22 3:02 ` Donglin Peng
2025-10-22 20:50 ` Eduard Zingerman
2025-10-23 10:35 ` Donglin Peng
2025-10-23 15:52 ` Alexei Starovoitov
2025-10-23 16:28 ` Andrii Nakryiko
2025-10-23 18:37 ` Alexei Starovoitov
2025-10-23 19:39 ` Andrii Nakryiko
2025-10-24 1:59 ` Donglin Peng
2025-10-24 2:23 ` Donglin Peng
2025-10-24 2:32 ` Eduard Zingerman
2025-10-24 3:04 ` Donglin Peng
2025-10-24 3:15 ` Eduard Zingerman
2025-10-24 3:19 ` Donglin Peng
2025-10-20 9:39 ` [RFC PATCH v2 3/5] libbpf: check if BTF is sorted " Donglin Peng
2025-10-20 9:39 ` [RFC PATCH v2 4/5] selftests/bpf: add tests for BTF deduplication and sorting Donglin Peng
2025-10-21 19:07 ` Eduard Zingerman [this message]
2025-10-23 11:20 ` Donglin Peng
2025-10-20 9:39 ` [RFC PATCH v2 5/5] btf: add CONFIG_BPF_SORT_BTF_BY_KIND_NAME Donglin Peng
2025-10-21 0:50 ` Eduard Zingerman
2025-10-21 8:33 ` Donglin Peng
2025-10-21 17:27 ` Alan Maguire
2025-10-22 1:15 ` Donglin Peng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ec7ecc7d47540bba04f6a0b7e0cf74f4ef7a84bb.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alan.maguire@oracle.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dolinux.peng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pengdonglin@xiaomi.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).