[PATCH v2 1/2] test/py: fit: Deduplicate the test

Tom Rini trini at konsulko.com
Tue Nov 25 15:16:22 CET 2025


On Tue, Nov 25, 2025 at 11:50:19AM +0100, Quentin Schulz wrote:
> Hi Marek,
> 
> On 11/24/25 8:40 PM, Marek Vasut wrote:
> [...]
> > ---
> >   test/py/tests/test_fit_auto_signed.py | 98 +++++++++++----------------
> >   1 file changed, 39 insertions(+), 59 deletions(-)
> > 
> > diff --git a/test/py/tests/test_fit_auto_signed.py b/test/py/tests/test_fit_auto_signed.py
> > index 0b5dbd5401c..3895e7d9369 100644
> > --- a/test/py/tests/test_fit_auto_signed.py
> > +++ b/test/py/tests/test_fit_auto_signed.py
> > @@ -138,6 +138,29 @@ class SignedFitHelper(object):
> >   @pytest.mark.buildconfigspec('fit_signature')
> >   @pytest.mark.requiredtool('fdtget')
> >   def test_fit_auto_signed(ubman):
> > +    def generate_and_check_fit_image(cmd, crc=False, simgs=False, scfgs=False, bl31present=False, key_name="", sign_algo="", verifier=""):
> 
> I would have grouped variables for the same "theme" together, e.g. simgs,
> scfgs with key_name, sign_algo and verifier for example. But that's fine as
> is.
> 
> > +        """Generate fitImage and test for expected entries.
> > +
> > +        Generate a fitImage and test whether suitable entries are part of
> > +        the generated fitImage. Test whether checksums and signatures are
> > +        part of the generated fitImage.
> 
> Would be nice to have documentation on what the parameters represent and
> what this returns/raises. Not a blocker though, I see we already don't do it
> for other functions.

Enhancing documentation within the tests is usually done when someone
has time to add it to doc/develop/pytest/ and so yes, doing it later /
follow-up is fine. And I still need to experiment on what's needed so
that readthedocs generates the output correctly, and not just local
builds get it correct.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251125/c141680e/attachment.sig>


More information about the U-Boot mailing list