[PATCH v1 2/3] test: fit: regression test for default-config print with reversed node order
Simon Glass
sjg at chromium.org
Mon May 11 15:31:07 CEST 2026
On 2026-05-08T21:31:58, Aristo Chen <aristo.chen at canonical.com> wrote:
> test: fit: regression test for default-config print with reversed node order
>
> Add a test that builds a FIT whose /configurations node is defined
> before /images in the source, runs iminfo, and asserts that the
> "Default Configuration: '<name>'" line appears in the output.
>
> Before the fix in the preceding commit ("boot/fit: read default-config
> property from the configurations node"), fit_print_contents() read the
> default-config property using the loop variable left over from iterating
> /images children. With /images defined first that variable accidentally
> pointed at /configurations and the line printed correctly; with
> /configurations defined first the read returned NULL and the line was
> silently omitted. The new test exercises the latter layout, which had
> no coverage.
>
> iminfo and the fit_print_contents() path had no test coverage at all
> before this commit.
>
> Signed-off-by: Aristo Chen <aristo.chen at canonical.com>
>
> test/py/tests/test_fit.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list