On Fri, May 29 2026, "Simon Glass" <[email protected]> wrote:
> Hi Rasmus, > > On 2026-05-29T19:46:18, Rasmus Villemoes <[email protected]> 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 <[email protected]> >> >> 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): >> [email protected]('sandbox') >> [email protected]('cmd_echo') >> [email protected]('cmd_source') >> [email protected]('fit') >> [email protected]('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. Indeed, I didn't really know exactly what boardspec('sandbox') meant, and couldn't find any documentation on it, so I kinda assumed it meant "all the sandbox_*" defconfigs. But regardless, I suppose the right thing to do is to just drop that boardspec line, since this really should fail on any .config without control_dtb_as_fit, regardless of whether any scripts are included in the .dtb via an appropriate .dtsi or not. Rasmus

