Hi Alexey,

On 2026-07-31T17:10:44, Alexey Charkov <[email protected]> wrote:
> binman: tests: Add test coverage for a FIT with embedded Linux+initrd and 
> /chosen
>
> Add a test for a FIT image with a fake Linux kernel and initrd, and a
> valid device tree into which a /chosen node is added (containing a
> bootargs property, as is relevant for Falcon mode boot).
>
> Signed-off-by: Alexey Charkov <[email protected]>
>
> tools/binman/ftest.py                          | 107 +++++++++++++++++++++++++
>  tools/binman/test/fit/fit_chosen.dts           |  62 ++++++++++++++
>  tools/binman/test/fit/fit_chosen_no_initrd.dts |  60 ++++++++++++++
>  tools/binman/test/fit/fit_chosen_no_load.dts   |  57 +++++++++++++
>  4 files changed, 286 insertions(+)

> +    def testFitChosen(self):
> +        """Test patching /chosen (bootargs + initrd) into generated FIT 
> FDTs"""

The alternate-DTs (model1/model2) have no /chosen node, so all three
tests only exercise the add_subnode() branch in _patch_fdt_chosen().
Please add a case where the input FDT already carries a /chosen (with
e.g. a pre-existing bootargs) to cover the path_offset() branch and
confirm the overwrite behaviour that the docs promise.

> +    def testFitChosenNoInitrd(self):
> +        """Test a Falcon-mode FIT where the optional initramfs is not 
> supplied"""

There is no coverage for a config that sets only fit,bootargs or only
fit,initrd (both DTS files set both). Since _patch_fdt_chosen() has
independent None-branches for each, a small case exercising each on
its own would be worth adding.

Regards,
Simon

Reply via email to