On Wed, Nov 09, 2022 at 05:48:00AM IST, Andrii Nakryiko wrote: > On Mon, Nov 7, 2022 at 3:11 PM Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote: > > > > Preparing the metadata for bpf_list_head involves a complicated parsing > > step and type resolution for the contained value. Ensure that corner > > cases are tested against and invalid specifications in source are duly > > rejected. Also include tests for incorrect ownership relationships in > > the BTF. > > > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > > --- > > .../selftests/bpf/prog_tests/linked_list.c | 271 ++++++++++++++++++ > > 1 file changed, 271 insertions(+) > > > > Have you considered using BTW write API to construct BTFs? > btf__new_empty() + btf__add_xxx()? > I didn't know about these. Let me give them a shot!