On Wed, 2024-02-28 at 12:29 -0600, David Vernet wrote: [...] > > +static void cant_load_full_object(void) > > +{ > > + struct struct_ops_autocreate *skel; > > + int err; > > + > > + old_print_cb = libbpf_set_print(print_cb); > > + skel = struct_ops_autocreate__open_and_load(); > > Optional suggestion: It might be useful to add a comment here explaining > exactly why we expect this to fail? Something like: > > /* The testmod_2 map BTF type (struct bpf_testmod_ops___v2) doesn't > * match the BTF of the actual struct bpf_testmod_ops defined in the > * kernel, so we should fail to load it if we don't disable autocreate > * for the map. > */ > > Feel free to ignore -- I recognize that some might just consider that > unnecessary noise. I will add this comment, agree that it helps when tests explain what happens. [...]