[PATCH v2 7/7] test: py: add mkimage dm-verity round-trip test
Daniel Golle
daniel at makrotopia.org
Fri Apr 17 00:58:45 CEST 2026
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.
More information about the U-Boot
mailing list