[PATCH v3 3/3] test: hook up test of allowing control DTB to act as FIT image
Simon Glass
sjg at chromium.org
Sat May 30 00:02:45 CEST 2026
Hi Rasmus,
On 2026-05-29T19:46:18, Rasmus Villemoes <rv at rasmusvillemoes.dk> wrote:
> test: hook up test of allowing control DTB to act as FIT image
>
> Add a test demonstrating how one can embed various scripts in the
> control DTB.
>
> Verify that the source command can be used with ${fdtcontroladdr} by
> itself (invoking the default script), and with :<node-name>
> suffix. Check that the scripts themselves can invoke 'sibling'
> scripts. Also verify that without CONTROL_DTB_AS_FIT set, the control
> DTB is not accepted by the source command.
>
> Signed-off-by: Rasmus Villemoes <rv at rasmusvillemoes.dk>
>
> arch/sandbox/dts/sandbox-boot.sh | 2 ++
> arch/sandbox/dts/sandbox-inner.sh | 4 ++++
> arch/sandbox/dts/sandbox-outer.sh | 4 ++++
> arch/sandbox/dts/sandbox_scripts.dtsi | 24 ++++++++++++++++++++++++
> configs/sandbox_defconfig | 2 ++
> test/py/tests/test_source.py | 32 ++++++++++++++++++++++++++++++++
> 6 files changed, 68 insertions(+)
> diff --git a/test/py/tests/test_source.py b/test/py/tests/test_source.py
> @@ -34,3 +34,35 @@ def test_source(ubman):
> + at pytest.mark.boardspec('sandbox')
> + at pytest.mark.buildconfigspec('cmd_echo')
> + at pytest.mark.buildconfigspec('cmd_source')
> + at pytest.mark.buildconfigspec('fit')
> + at pytest.mark.notbuildconfigspec('control_dtb_as_fit')
> +def test_source_reject_control_dtb(ubman):
> + assert 'Fail' in ubman.run_command('source ${fdtcontroladdr} || echo Fail')
> + assert 'Fail' in ubman.run_command('source ${fdtcontroladdr}:boot || echo Fail')
Just to check: since sandbox_defconfig now enables CONTROL_DTB_AS_FIT,
this case is skipped on the main sandbox build. Did you confirm it
runs on one of the other variants (sandbox_noinst / sandbox_spl /
sandbox64)? If none satisfy the marker combination, this is dead code.
Perhaps note in the commit message where it does run?
Reviewed-by: Simon Glass <sjg at chromium.org>
Regards,
Simon
More information about the U-Boot
mailing list