test: fit: add test case for invalid default configuration reference
authorAristo Chen <jj251510319013@gmail.com>
Tue, 15 Jul 2025 13:03:07 +0000 (13:03 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 23 Jul 2025 19:12:16 +0000 (13:12 -0600)
commit93d09d3bd8ea941eff860443db2d8628cdbfe7e8
tree124ec402bb724d471afa68e58e17bd5b38781b10
parentedb4bf38688bb232ba0739585693aa94be5246f5
test: fit: add test case for invalid default configuration reference

Recent changes to mkimage introduced a validation step to ensure that
the 'default' property under the /configurations node in a FIT image
references a valid configuration subnode. If the referenced node is
missing, mkimage will now return an error.

This patch adds a Python test case to verify that mkimage correctly
fails when the 'default' configuration does not exist. The test creates
a minimal ITS with an invalid default reference and checks that mkimage
produces the expected error message.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
test/py/tests/test_fit_mkimage_validate.py