[RFC PATCH] test/py: Check hashes produced by mkimage against known values

Tom Rini trini at konsulko.com
Wed Oct 6 00:02:45 CEST 2021


On Wed, Sep 15, 2021 at 02:33:01PM -0500, Alexandru Gagniuc wrote:

> Target code and mkimage share the same hashing infrastructure. If one
> is wrong, it's very likely that both are wrong in the same way. Thus
> testing won't catch hash regressions. This already happened in
> commit 92055e138f28 ("image: Drop if/elseif hash selection in
> calculate_hash()"). None of the tests caught that CRC32 was broken.
> 
> Instead of testing hash_calculate() against itself, create a FIT with
> containing a kernel with pre-calculated hashes. Then check the hashes
> produced against the known good hashes.
> 
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20211005/9c786579/attachment.sig>


More information about the U-Boot mailing list