On Wed, Jul 2, 2025 at 12:42 AM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > On Tue, 2025-07-01 at 14:07 -0700, Andrii Nakryiko wrote: > > [...] > > > we should be getting rid of all those __ksym __weak kfunc > > redefinitions because they now should come from vmlinux.h, not add > > more of that, IMO. > > Tbh, I'm not sure this matters much. Kfunc signatures don't change > often (don't remember it ever happen), so having prototypes here and > there in selftests shouldn't be a maintenance burden. Ok, if I'm the only one who thinks we shouldn't duplicate kfunc definitions because we have an established approach that works, so be it, not such a big deal. I'm curious to see if the next step would be someone asking to do something about enum or struct that is defined only with some kernel configuration that selftest relies on. Are we going to add extra #defines just to be able to do #ifndef-#define-#endif guarding in selftest source code just to accommodate someone wanting to build BPF selftests, but not wanting to follow prescribed build setup? Or start adding feature detection in Makefile and exclude some tests from being built? Will that start to be a maintenance burden? I guess I just don't understand the direction here.