On Wed, Oct 13, 2021 at 6:55 PM Jeremy Kerr <jk@xxxxxxxxxxxxxxxxxxxx> wrote: > Resulting in the .kunit_test_suites section just being a set of > contiguous pointers to struct kunit_suite. We get the number of suites > from the section size. <snip> > > That was my thinking, anyway. I think it probably makes sense to do that > cleanup after the section patch, as that means we don't need any > post-processing on the suites arrays. To be honest, I'm actually tempted to pay the cost of postprocessing and proposing a change like this for real. Going from kunit_suite*** to ** shaves off a lot of code from the unit test and the filtering code path. Specifically I'm thinking this can go into the kunit branch, https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/?h=kunit Then when we have the series reworking modules, one of two things can happen. 1. if we get to kunit_suite** with null-terminated arrays, fixing the executor just means dropping the post-processing step. 2. If we get to kunit_suite* as mentioned above, then there'll be a bit more work, but not as much. Alternatively, I can wait and send you an updated version of this patch to include at the start of your series like PATCH 1/x: this patch with post-processing, using either * or ** ... PATCH x/x: final rework, and drop the postprocessing It's just that the prospect of submitting a patch that reduces so much code makes me eager to try and get it submitted :) Brendan and David seem ok with paying the bit of runtime overhead for post-processing, esp. if we time it so this patch lands in the same Linux release as the module rework. But I can hold off if it'll make your life more difficult. > > Cheers, > > > Jeremy