summaryrefslogtreecommitdiff
path: root/include/test/spl.h
AgeCommit message (Collapse)Author
2025-10-13spl: FIT: Make SPL_LOAD_FIT_FULL depend on SPL_LOAD_FITTom Rini
Today, only a few platforms enable SPL_LOAD_FIT_FULL, and all enable SPL_LOAD_FIT. As can be seen in usage, the FULL symbol is a superset of the first symbol, not an alternative. Update Kconfig entries based on this and simplify the only code which checks for either being set. Signed-off-by: Tom Rini <[email protected]>
2024-08-26test: Rename unit-test flagsSimon Glass
The UT_TESTF_ macros read as 'unit test test flags' which is not right. Rename to UTF ('unit test flags'). This has the benefit of being shorter, which helps keep UNIT_TEST() declarations on a single line. Give the enum a name and reference it from the UNIT_TEST() macros while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-11-16test: spl: Support testing LEGACY_LZMA filesystem imagesSean Anderson
These will soon be supported, so we need to be able to test it. Export the lzma data and generally use the same process in spl_test_mmc_fs as do_spl_test_load. If we end up needing this in third place in the future, it would probably be good to refactor things out. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-17test: spl: Add a test for the NOR load methodSean Anderson
Add a test for the NOR load method. Since NOR is memory-mapped we can substitute a buffer instead. The only major complication is testing LZMA decompression. It's too complex to implement LZMA compression in a test, and we have no in-tree compressor, so we just include some pre-compressed data. This data was generated through something like generate_data(plain, plain_size, "lzma") cat plain.dat | lzma | hexdump -C and was cleaned up further in my editor. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-17test: spl: Add a test for the MMC load methodSean Anderson
Add a test for the MMC load method. This shows the general shape of tests to come: The main test function calls do_spl_test_load with an appropriate callback to write the image to the medium. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-17test: spl: Add functions to create filesystemsSean Anderson
Add some functions for creating fat/ext2 filesystems with a single file and a test for them. Filesystems require block devices, and it is easiest to just use MMC for this. To get an MMC, we must also pull in the test device tree. SPL_TIMER is necessary for SPL_MMC, perhaps because it uses a timeout. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-17test: spl: Add functions to create imagesSean Anderson
This add some basic functions to create images, and a test for said functions. This is not intended to be a test of the image parsing functions, but rather a framework for creating minimal images for testing load methods. That said, it does do an OK job at finding bugs in the image parsing directly. Since we have two methods for loading/parsing FIT images, add LOAD_FIT_FULL as a separate CI run. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>