On Mon, Feb 16, 2026 at 09:22:59PM +0000, Daniel Golle wrote: > Add unit tests for the image_loader framework covering its core > logic with a mock storage backend: > > - map() allocates, reads and records a region > - map() returns cached pointer for already-mapped range > - map() returns correct offset within a larger region > - map() re-reads when extending a region to a larger size > - map_to() reads to a specified address and records it > - lookup() returns NULL for unmapped ranges > - alloc_ptr advances with correct alignment > - map() returns NULL when the translation table is full > - cleanup() calls backend and resets state > - map() with multiple disjoint regions > - read beyond image size returns error > > Also fix IMAGE_LOADER_MAX_REGIONS Kconfig to depend on IMAGE_LOADER > and default to 16 unconditionally (the previous 'default 0' fallback > caused the regions array to be zero-sized when IMAGE_LOADER was > enabled after initial defconfig generation).
Since this is introduced earlier in the series, it should just be done correctly to start with. The bias in me wants to say the AI didn't catch this and should have. -- Tom
signature.asc
Description: PGP signature

