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 v2: - Keep test_tpm2_continue_self_test() Simon Glass (3): tpm: sandbox: Support self-test continue in emulator tpm: Convert sandbox-focussed tests to C tpm: Drop unwanted special cases for sandbox drivers/tpm/tpm_tis_sandbox.c | 1 + test/dm/tpm.c | 77 +++++++++++++++++++++++++++++++- test/py/tests/test_tpm2.py | 84 +++++------------------------------ 3 files changed, 87 insertions(+), 75 deletions(-) -- 2.42.0.869.gea05f2083d-goog