History log of /u-boot/test/py/tests/test_fit_hashes.py
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# c620ea45 06-Aug-2022 Simon Glass <sjg@chromium.org>

test: Update FIT tests to run in parallel

Use a different temporary dir for each test, to allow them to run in
parallel.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 01e1e2a9 15-Sep-2021 Alexandru Gagniuc <mr.nuke.me@gmail.com>

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 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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 01e1e2a9 15-Sep-2021 Alexandru Gagniuc <mr.nuke.me@gmail.com>

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 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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>