[PATCH v2 3/3] test: hook up test of allowing control DTB to act as FIT image
Rasmus Villemoes
ravi at prevas.dk
Tue May 26 23:18:24 CEST 2026
On Mon, May 25 2026, Simon Glass <sjg at chromium.org> wrote:
> Hi Rasmus,
>
> On 2026-05-19T22:54:57, Rasmus Villemoes <ravi at prevas.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. Also check that the scripts themselves can invoke 'sibling'
>> scripts.
>>
>> Signed-off-by: Rasmus Villemoes <ravi at prevas.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 | 18 ++++++++++++++++++
>> 6 files changed, 54 insertions(+)
>
>> diff --git a/test/py/tests/test_source.py b/test/py/tests/test_source.py
>> @@ -9,6 +9,7 @@ import utils
>> @pytest.mark.buildconfigspec('cmd_echo')
>> @pytest.mark.buildconfigspec('cmd_source')
>> @pytest.mark.buildconfigspec('fit')
>> + at pytest.mark.buildconfigspec('control_dtb_as_fit')
>> def test_source(ubman):
>
> buildconfigspec markers are ANDed in conftest.py, so the entire
> pre-existing test_source is now skipped on any sandbox build that has
> FIT but not CONTROL_DTB_AS_FIT - so silently losing coverage of the
> original source tests.
>
> Please split the new assertions into a second function, say
> test_source_control_dtb, with the extra marker on its own. That also
> makes the new functionality independently selectable.
Yes, I did consider doing that, and I must admit I'm not really sure why
I ended up not doing it. Will redo.
Is it worth it adding another function marked with
@pytest.mark.notbuildconfigspec('control_dtb_as_fit') and checking that
'source ${fdtcontroladdr}' always fails in that case?
Rasmus
More information about the U-Boot
mailing list