[PATCH v10 09/10] test/py: only run 'tpm2 autostart' to init the tpm
Eddie James
eajames at linux.ibm.com
Mon Aug 7 17:17:34 CEST 2023
From: Ilias Apalodimas <ilias.apalodimas at linaro.org>
commit xxxxxxxx ("")
replaced the forced and sandbox tpm2 initialization running 'tpm2
autostart' instead of the startup tpm sequence. The difference is that
the new function handles the internal tpm_init state internally and
doesn't return an error when trying to initialize the tpm multiple
times. Replace the remaining instances
Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
test/py/tests/test_tpm2.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index 8cd3046285..5bbb2d2069 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -61,7 +61,7 @@ def test_tpm2_init(u_boot_console):
skip_test = u_boot_console.config.env.get('env__tpm_device_test_skip', False)
if skip_test:
pytest.skip('skip TPM device test')
- u_boot_console.run_command('tpm2 init')
+ u_boot_console.run_command('tpm2 autostart')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -97,11 +97,7 @@ def test_tpm2_sandbox_self_test_full(u_boot_console):
"""
if is_sandbox(u_boot_console):
u_boot_console.restart_uboot()
- u_boot_console.run_command('tpm2 init')
- output = u_boot_console.run_command('echo $?')
- assert output.endswith('0')
-
- u_boot_console.run_command('tpm2 startup TPM2_SU_CLEAR')
+ u_boot_console.run_command('tpm2 autostart')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
--
2.39.3
More information about the U-Boot
mailing list