[PATCH v2 6/7] test: boot: add runtime unit test for fit_verity_build_cmdline()

Daniel Golle daniel at makrotopia.org
Fri Apr 17 01:25:47 CEST 2026


On Fri, Apr 17, 2026 at 07:36:37AM +1200, Simon Glass wrote:
> Hi Daniel,
> 
> On 2026-04-16T01:46:15, Daniel Golle <daniel at makrotopia.org> wrote:
> > test: boot: add runtime unit test for fit_verity_build_cmdline()
> >
> > Add test/boot/fit_verity.c with four tests that construct FIT blobs
> > in memory and exercise fit_verity_build_cmdline().
> >
> > Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> >
> > test/boot/Makefile     |   1 +
> >  test/boot/fit_verity.c | 302 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  test/cmd_ut.c          |   2 +
> >  3 files changed, 305 insertions(+)
> 
> > diff --git a/test/boot/fit_verity.c b/test/boot/fit_verity.c
> > @@ -0,0 +1,302 @@
> > +             ret = fdt_setprop_string(buf, verity_node, "algo", "sha256");
> > +             val = cpu_to_fdt32(4096);
> > +             ret = fdt_setprop(buf, verity_node, "data-block-size",
> 
> Please can you use the FIT_VERITY_*_PROP constants from
> include/image.h instead of literal strings? See test/image/spl_load.c
> for an example.

Sure, I'll change that.

I was deliberately not doing it so the test code is as self-contained
as possible.


More information about the U-Boot mailing list