From: Alan Maguire <alan.maguire@oracle.com>
To: Eduard Zingerman <eddyz87@gmail.com>, andrii@kernel.org, ast@kernel.org
Cc: jolsa@kernel.org, acme@redhat.com, quentin@isovalent.com,
mykolal@fb.com, daniel@iogearbox.net, martin.lau@linux.dev,
song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, houtao1@huawei.com, bpf@vger.kernel.org,
masahiroy@kernel.org, mcgrof@kernel.org, nathan@kernel.org
Subject: Re: [PATCH v2 bpf-next 03/13] selftests/bpf: test distilled base, split BTF generation
Date: Wed, 1 May 2024 18:31:11 +0100 [thread overview]
Message-ID: <e60a8bb8-6202-47a1-b099-b47f334de472@oracle.com> (raw)
In-Reply-To: <d73031b51394b8db13556177e42820674dcc8157.camel@gmail.com>
On 01/05/2024 00:55, Eduard Zingerman wrote:
> On Wed, 2024-04-24 at 16:47 +0100, Alan Maguire wrote:
>
>
> [...]
>
>> +static void test_distilled_base(void)
>> +{
>>
>
> [...]
>
>> +
>> + VALIDATE_RAW_BTF(
>> + btf1,
>> + "[1] INT 'int' size=4 bits_offset=0 nr_bits=32 encoding=SIGNED",
>> + "[2] PTR '(anon)' type_id=1",
>> + "[3] STRUCT 's1' size=8 vlen=1\n"
>> + "\t'f1' type_id=2 bits_offset=0",
>> + "[4] STRUCT '(anon)' size=12 vlen=2\n"
>> + "\t'f1' type_id=1 bits_offset=0\n"
>> + "\t'f2' type_id=3 bits_offset=32",
>> + "[5] INT 'unsigned int' size=4 bits_offset=0 nr_bits=32 encoding=(none)",
>> + "[6] UNION 'u1' size=12 vlen=2\n"
>> + "\t'f1' type_id=1 bits_offset=0\n"
>> + "\t'f2' type_id=2 bits_offset=0",
>> + "[7] UNION '(anon)' size=4 vlen=1\n"
>> + "\t'f1' type_id=1 bits_offset=0",
>> + "[8] ENUM 'e1' encoding=UNSIGNED size=4 vlen=1\n"
>> + "\t'v1' val=1",
>> + "[9] ENUM '(anon)' encoding=UNSIGNED size=4 vlen=1\n"
>> + "\t'av1' val=2",
>> + "[10] ENUM64 'e641' encoding=SIGNED size=8 vlen=1\n"
>> + "\t'v1' val=1024",
>> + "[11] ENUM64 '(anon)' encoding=SIGNED size=8 vlen=1\n"
>> + "\t'v1' val=1025",
>> + "[12] STRUCT 'unneeded' size=4 vlen=1\n"
>> + "\t'f1' type_id=1 bits_offset=0",
>> + "[13] STRUCT 'embedded' size=4 vlen=1\n"
>> + "\t'f1' type_id=1 bits_offset=0",
>> + "[14] FUNC_PROTO '(anon)' ret_type_id=1 vlen=1\n"
>> + "\t'p1' type_id=1",
>> + "[15] ARRAY '(anon)' type_id=1 index_type_id=1 nr_elems=3");
>
> Sorry, one more thing,
> maybe add a a FUNC_PROTO referencing a struct and refer to this proto from btf2?
> To check that FUNC_PROTOs are visited as appropriate.
>
good idea, I'll add this. the test will need to be reworked anyway since
ref types etc will move to split BTF.
>> +
>> + btf2 = btf__new_empty_split(btf1);
>> + if (!ASSERT_OK_PTR(btf2, "empty_split_btf"))
>> + goto cleanup;
>> +
>
> [...]
next prev parent reply other threads:[~2024-05-01 17:31 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 15:47 [PATCH v2 bpf-next 00/13] bpf: support resilient split BTF Alan Maguire
2024-04-24 15:47 ` [PATCH v2 bpf-next 01/13] libbpf: add support to btf__add_fwd() for ENUM64 Alan Maguire
2024-04-26 22:56 ` Andrii Nakryiko
2024-04-24 15:47 ` [PATCH v2 bpf-next 02/13] libbpf: add btf__distill_base() creating split BTF with distilled base BTF Alan Maguire
2024-04-26 22:57 ` Andrii Nakryiko
2024-04-30 23:06 ` Eduard Zingerman
2024-05-01 17:29 ` Alan Maguire
2024-05-01 17:43 ` Eduard Zingerman
2024-05-02 11:51 ` Alan Maguire
2024-04-24 15:47 ` [PATCH v2 bpf-next 03/13] selftests/bpf: test distilled base, split BTF generation Alan Maguire
2024-04-30 23:50 ` Eduard Zingerman
2024-04-30 23:55 ` Eduard Zingerman
2024-05-01 17:31 ` Alan Maguire [this message]
2024-04-24 15:47 ` [PATCH v2 bpf-next 04/13] libbpf: add btf__parse_opts() API for flexible BTF parsing Alan Maguire
2024-04-29 23:40 ` Andrii Nakryiko
2024-05-01 17:42 ` Alan Maguire
2024-05-01 17:47 ` Andrii Nakryiko
2024-05-01 0:07 ` Eduard Zingerman
2024-04-24 15:47 ` [PATCH v2 bpf-next 05/13] bpftool: support displaying raw split BTF using base BTF section as base Alan Maguire
2024-04-29 23:42 ` Andrii Nakryiko
2024-04-24 15:47 ` [PATCH v2 bpf-next 06/13] kbuild,bpf: switch to using --btf_features for pahole v1.26 and later Alan Maguire
2024-04-29 23:43 ` Andrii Nakryiko
2024-05-01 17:22 ` Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 07/13] resolve_btfids: use .BTF.base ELF section as base BTF if -B option is used Alan Maguire
2024-04-29 23:45 ` Andrii Nakryiko
2024-05-01 20:39 ` Eduard Zingerman
2024-05-02 14:53 ` Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 08/13] kbuild, bpf: add module-specific pahole/resolve_btfids flags for distilled base BTF Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 09/13] libbpf: split BTF relocation Alan Maguire
2024-04-30 0:14 ` Andrii Nakryiko
2024-04-30 16:56 ` Alan Maguire
2024-04-30 17:41 ` Andrii Nakryiko
2024-05-02 16:39 ` Eduard Zingerman
2024-04-24 15:48 ` [PATCH v2 bpf-next 10/13] module, bpf: store BTF base pointer in struct module Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 11/13] libbpf,bpf: share BTF relocate-related code with kernel Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 12/13] selftests/bpf: extend distilled BTF tests to cover BTF relocation Alan Maguire
2024-04-24 15:48 ` [PATCH v2 bpf-next 13/13] bpftool: support displaying relocated-with-base split BTF Alan Maguire
2024-04-26 22:56 ` [PATCH v2 bpf-next 00/13] bpf: support resilient " Andrii Nakryiko
2024-04-27 0:24 ` Andrii Nakryiko
2024-04-29 15:25 ` Alan Maguire
2024-04-29 17:05 ` Andrii Nakryiko
2024-04-29 17:31 ` Alan Maguire
2024-04-29 18:02 ` Andrii Nakryiko
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=e60a8bb8-6202-47a1-b099-b47f334de472@oracle.com \
--to=alan.maguire@oracle.com \
--cc=acme@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=houtao1@huawei.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mykolal@fb.com \
--cc=nathan@kernel.org \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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).