On Tue, Oct 8, 2024 at 3:35 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > The selftests build two kernel modules (bpf_testmod.ko and > bpf_test_no_cfi.ko) which use copy-pasted Makefile targets. This is a > bit messy, and doesn't scale so well when we add more modules, so let's > consolidate these rules into a single rule generated for each module > name, and move the module sources into a single directory. > > To avoid parallel builds of the different modules stepping on each > other's toes during the 'modpost' phase of the Kbuild 'make modules', we > create a single target for all the defined modules, which contains the > recursive 'make' call into the modules directory. The Makefile in the > subdirectory building the modules is modified to also touch a > 'modules.built' file, which we can add as a dependency on the top-level > selftests Makefile, thus ensuring that the modules are always rebuilt if > any of the dependencies in the selftests change. Nice cleanup, but looks unrelated to the fix and hence not a bpf material. Why combine them?