Hi Petr,

On 2026-10-10T14:24:46, Petr Hodina via B4 Relay
<[email protected]> wrote:
> binman: test: Add fit fdt compression device trees
>
> Add two copies of fit/fdt.dts whose @fdt-SEQ template asks for "lzma"
> and for an unsupported algorithm ("bzip2").
>
> Signed-off-by: Petr Hodina <[email protected]>
>
> tools/binman/test/fit/fdt_bad_comp.dts | 72 ++++++++++++++++++++++++++++++++++
>  tools/binman/test/fit/fdt_lzma.dts     | 72 
> ++++++++++++++++++++++++++++++++++
>  2 files changed, 144 insertions(+)

> diff --git a/tools/binman/test/fit/fdt_bad_comp.dts 
> b/tools/binman/test/fit/fdt_bad_comp.dts
> @@ -0,0 +1,72 @@
> +                             kernel {
> +                                     description = "Vanilla Linux kernel";
> +                                     type = "kernel";
> +                                     arch = "ppc";
> +                                     os = "linux";
> +                                     compression = "gzip";
> +                                     load = <00000000>;
> +                                     entry = <00000000>;
> +                                     hash-1 {
> +                                             algo = "crc32";
> +                                     };
> +                                     hash-2 {
> +                                             algo = "sha1";
> +                                     };
> +                                     u-boot {
> +                                     };
> +                             };
> +                             @fdt-SEQ {
> +                                     description = "fdt-NAME.dtb";
> +                                     type = "flat_dt";
> +                                     compression = "bzip2";

These two files are full copies of fit/fdt.dts, differing in only one
line. Most of the content (the atf, uboot and kernel images and the
hash nodes) has nothing to do with what is being tested. The error
test only needs a binman node with a fit containing fit,fdt-list and
an @fdt-SEQ node with compression = 'bzip2'. Please can you cut both
files down to the minimum needed? That reduces the duplication and
makes it obvious what each test checks. If you keep the u-boot and
u-boot-nodtb entries in fdt_lzma.dts, the slicing in
testFitFdtCompressed() still works, or you could drop them and use
FromData() on the whole image.

Regards,
Simon

Reply via email to