On Sat, Jul 26, 2025 at 09:42:37AM +0800, Zhang Yi wrote: > > In the future, we should try to make sure that when we modify data > > structures to add or remove struct elements, that we also make sure > > that kunit test should also be updated. > > Yes, currently in the Kunit tests, the initialization and maintenance > of data structures are too fragmented and fragile, making it easy to > overlook during modifications. In the future, I think we should provide > some general interfaces to handle the initialization and > deinitialization of those data structures. Yes. I was thinking similar thoughts; perhap some of the structure initialization should be refactored and put in mballoc.c instead of mballoc-test.c. Even if we have to have some #ifdef CONFIG_EXT4_KUNIT_TESTS so that some of the test mocks are in same place that the structure manipulation functions in a single file. - Ted