On Fri, Jun 24, 2022 at 02:45:47PM -0700, Andrii Nakryiko wrote: > On Thu, Jun 23, 2022 at 2:22 PM Daniel Müller <deso@xxxxxxxxxx> wrote: > > > > This change extends the type based tests with another struct type (in > > addition to a_struct) to check relocations against: a_complex_struct. > > This type is nested more deeply to provide additional coverage of > > certain paths in the type match logic. > > > > Signed-off-by: Daniel Müller <deso@xxxxxxxxxx> > > --- > > I'd like us to have a TYPE_MATCHES test against struct task_struct, > something like below: > > struct mm_struct___wrong { > int abc_whatever_should_not_exist; > }; > > struct task_struct____local { > int pid; > struct mm_struct___wrong *mm; > }; > > > and then use struct task_struct____local with bpf_core_type_matches() > and check that it succeeds. This will show that TYPE_MATCHES can be > used practically. Can you please add it to > progs/test_core_reloc_kernel.c? Thanks for the suggestion! I will include that test. [...] Daniel