tpm: Convert sandbox-focussed tests to C
authorSimon Glass <sjg@chromium.org>
Sat, 24 May 2025 13:06:35 +0000 (07:06 -0600)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 10 Jun 2025 16:35:26 +0000 (19:35 +0300)
commitedc4bfd2e32a58b09e88f8a12e5e97d72232c6ff
tree873af99dc92dd4509f16de4bc003dcf9753ecb04
parent1f144b61740d4e0acf15cc82911bc6129f2f814e
tpm: Convert sandbox-focussed tests to C

Some of the Python tests are a pain because they don't reset the TPM
state before each test. Driver model tests do this, so convert the
tests to C.

This means that these tests won't run on real hardware, but we have
tests which do TPM init, so there is still enough coverage.

Rename and update the Python tpm_init test to use 'tpm autostart',
since this fully initializes the TPM and performs the self tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
test/dm/tpm.c
test/py/tests/test_tpm2.py