[PATCH v3 0/4] tpm: Start to tidy up TPM tests

Simon Glass sjg at chromium.org
Mon May 26 07:19:22 CEST 2025


Hi Ilias,

On Sat, 24 May 2025 at 15:23, Tom Rini <trini at konsulko.com> wrote:
>
> On Sat, May 24, 2025 at 07:06:33AM -0600, Simon Glass wrote:
>
> > This series is a starting point only. It tries to provide some direction
> > for how the TPM tests should be run on real hardware and on sandbox.
> >
> > For sandbox, things are relatively easy since the TPM is reset before
> > each test. Tests should start up the TPM before doing anything. Tests
> > can be run in parallel, which is fine because tests are independent.
> >
> > For real hardware, tests cannot be made independent, other than by
> > resetting the board, which if the hardware is correct, resets the TPM.
> > So there may be more work to do to figure that out. The approach taken
> > in this series for real hardware is to have a few tests which do init,
> > then have the rest of the tests assume that the init is done. Tests
> > that depend on the TPM already being inited can use 'tpm autostart'
> > which works OK on sandbox and real hardware.
> >
> > Changes in v3:
> > - Use 'check' instead of 'test' when naming test helpers
> > - Add missing tpm_self_test_full() call
> > - Add new patch to skip failing tests on coral
> >
> > Changes in v2:
> > - Keep test_tpm2_continue_self_test()
> >
> > Simon Glass (4):
> >   tpm: sandbox: Support self-test continue in emulator
> >   tpm: Convert sandbox-focussed tests to C
> >   tpm: Drop unwanted special cases for sandbox
> >   test: tpm: Skip failing tests on coral
> >
> >  drivers/tpm/tpm_tis_sandbox.c |  1 +
> >  test/dm/tpm.c                 | 77 ++++++++++++++++++++++++++++++-
> >  test/py/tests/test_tpm2.py    | 86 ++++++-----------------------------
> >  3 files changed, 89 insertions(+), 75 deletions(-)
> >
> > --
> > 2.43.0
> >
> > base-commit: e3ced530e543c9f24cbc66430abc6109ce8df015
> > branch: tpm3
>
> This is not based on mainline, please stop posting things like this.

This applies cleanly to Tom's tree.

You've reviewed patches 1 and 3. I updated patch 2 based on your
comments, so let me know if you have any further thoughts.

I'd plan to apply this (or a later version) to my tree as well so that
coral TPM tests pass.

BTW I got the LetsTrust TPM so should be able to add this to my lab in
the next few weeks.

Regards,
Simon


More information about the U-Boot mailing list