Skip to content
Snippets Groups Projects
Commit 01e1e2a9 authored by Alexandru Gagniuc's avatar Alexandru Gagniuc Committed by Tom Rini
Browse files

test/py: Check hashes produced by mkimage against known values


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 92055e13 ("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: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent 8a47982e
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment