Hi Aristo,

On 2026-07-21T15:21:05, Aristo Chen <[email protected]> wrote:
> test: fit: cover mkimage load address overlap detection
>
> Add a test that mkimage rejects a FIT image whose configuration
> references a kernel and an FDT with the same load address, and that
> the error message names the offending configuration and images.
>
> Also add a companion test for the intended escape hatch: two images
> may use the same load address as long as no single configuration
> references both of them. Only one configuration is selected at
> runtime, so such images never coexist in memory. This mirrors the TI
> K3 tispl layout after commit c85bf61b14f9 ("arm: k3: select tifsstub
> via board_fit_config_name_match"), where each security state has its
> own configuration and all tifsstub variants share one load address.
>
> Signed-off-by: Aristo Chen <[email protected]>
>
> test/py/tests/test_fit_mkimage_validate.py | 134 +++++++++++++++++++++++++++++
>  1 file changed, 134 insertions(+)

> diff --git a/test/py/tests/test_fit_mkimage_validate.py 
> b/test/py/tests/test_fit_mkimage_validate.py
> @@ -160,3 +160,137 @@ def test_fit_auto_basename_dotted_directory(ubman, 
> dtb_relpath, expected_desc):
> +    assert result.returncode != 0, "mkimage should fail due to memory 
> overlap"
> +    assert "has overlapping load regions" in result.stderr
> +    # Check that it identifies the specific overlapping components
> +    assert "kernel@1" in result.stderr and "fdt@1" in result.stderr

The commit message says the error message names the offending
configuration and images, but the test only checks the two image names.
Please can you also assert that 'conf@1' appears in stderr, so the
configuration-name part is covered - otherwise a regression that dropped
the configuration name would go unnoticed.

Regards,
Simon

Reply via email to