[PATCH v2 7/7] test: py: add mkimage dm-verity round-trip test
Simon Glass
sjg at chromium.org
Fri Apr 17 01:59:54 CEST 2026
Hi Daniel,
On Fri, 17 Apr 2026 at 10:58, Daniel Golle <daniel at makrotopia.org> wrote:
>
> On Fri, Apr 17, 2026 at 07:36:17AM +1200, Simon Glass wrote:
> > Hi Daniel,
> >
> > On 2026-04-16T01:46:15, Daniel Golle <daniel at makrotopia.org> wrote:
> > > test: py: add mkimage dm-verity round-trip test
> > >
> > > Add test/py/tests/test_fit_verity.py with two tests.
> > >
> > > Both tests are skipped if veritysetup is not installed on the host.
> > >
> > > Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> > >
> > > test/py/tests/test_fit_verity.py | 153 +++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 153 insertions(+)
> >
> > > diff --git a/test/py/tests/test_fit_verity.py b/test/py/tests/test_fit_verity.py
> > > @@ -0,0 +1,153 @@
> > > +import struct
> >
> > The struct import seems to be unused.
> >
> > > diff --git a/test/py/tests/test_fit_verity.py b/test/py/tests/test_fit_verity.py
> > > @@ -0,0 +1,153 @@
> > > +def have_veritysetup():
> > > + return shutil.which('veritysetup') is not None
> > > +
> > > +
> > > + at pytest.mark.requiredtool('dtc')
> > > + at pytest.mark.requiredtool('fdtget')
> > > + at pytest.mark.skipif(not have_veritysetup(),
> > > + reason='veritysetup not installed')
> > > +def test_mkimage_verity(ubman):
> >
> > The test infrastructure supports
> > @pytest.mark.requiredtool('veritysetup') which handles the skip
> > message consistently. That also means you can drop the
> > have_veritysetup() helper.
>
> I have to admit that Python is not one of my strengths...
> I'll try to figure it out and address this in v3.
Me neither, despite having written quite a bit of it. Let me know if
you need help with any of it.
Regards,
Simon
More information about the U-Boot
mailing list