[PATCH 00/26] test: spl: Test some load methods

Sean Anderson seanga2 at gmail.com
Thu Oct 12 03:59:35 CEST 2023


On 10/11/23 21:56, Sean Anderson wrote:
> This series adds some tests for various SPL load methods, with the intent of
> helping debug v6 of [1]. With that in mind, notable omissions include NAND and
> ROMAPI, which both lack sandbox implementations, and OS_BOOT, which I have
> deferred due to its complexity. Semihosting is also omitted, but I think we can
> test that with qemu.
> 
> In order to test all of these methods, we must first generate suitable images,
> possibly on filesystems. While other tests have historically generated these
> images using external tools (e.g. mkimage, mkfs, etc.), I have chosen to
> generate them on the fly. This is for a few reasons:
> 
> - By removing external dependencies on pytest to create certain files, the tests
>    become self-contained. This makes them easier to iterate on and debug.
> - By generating tests at runtime, we can dynamically vary the content. This
>    helps detect test failures, as even if tests are loaded to the same location,
>    the expected content will be different.
> - We are not testing the image parsers themselves (e.g. spl_load_simple_fit or
>    fs_read) but rather the load methods (e.g. spl_mmc_load_image). It is
>    unnecessary to exercise full functionality or generate 100% correct images.
> - By reducing functionality to only what is necessary, the complexity of various
>    formats can often be greatly reduced.
> 
> This series depends on [2-3], which are small fixes identified through this
> patch set. The organization of patches in this series is as follows:
> 
> - General fixes for bugs which are unlikely to be triggered outside of this
>    series
> - Changes to IMX8 container images to facilitate testing
> - General prep. work, particularly regarding linker issues
> - The tests themselves
> 
> Mostly-passing CI at [4]; I have since fixed the typo/missing cast.

CI run for the series as-sent:

https://source.denx.de/u-boot/custodians/u-boot-clk/-/pipelines/18092

(hopefully by the time you read this it will have passed)

--Sean


More information about the U-Boot mailing list