diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2023-10-25 10:25:25 +0300 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2023-10-27 13:17:21 +0300 |
commit | 4fd7d27ccb763ce8b836a0e4c5dd005392d38e18 (patch) | |
tree | e5f74f2e02f271d72bec55957938cd1e83a6c395 /test | |
parent | 539e2f7c1011549a5a98a59b506c6d3927549b03 (diff) | |
download | u-boot-4fd7d27ccb763ce8b836a0e4c5dd005392d38e18.tar.gz u-boot-4fd7d27ccb763ce8b836a0e4c5dd005392d38e18.tar.bz2 u-boot-4fd7d27ccb763ce8b836a0e4c5dd005392d38e18.zip |
test/py: always use autostart on tpm2 selftests
commit 789ed2784256 ("test/py: replace 'tpm2 init, startup, selftest' sequences")
changed some of the tpm2 init sequences to 'tpm2 autostart' instead of
calling 'tpm init', 'tpm startup TPM2_SU_CLEAR', 'tpm2 self_test full'.
The autostart command calls the afforementioned sequence and on top of
that deals with the 'tpm2 init' return codes if the tpm is already
started. Since we initialize the tpm from various subsystems now,
replace the last remaining instances of 'tpm2 init' with 'tpm2
autostart'. Since the latter calls 'tpm2 init' anyway we will still be
implicitly testing the validity of that command
It's worth noting that since 'tpm2 autostart' performs the startup and
self tests sequences of the tpm we could drop
'test_tpm2_sandbox_self_test_full' and 'test_tpm2_startup, but let's
keep the since they test tpm commands and options
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/tests/test_tpm2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py index 47392b87a9..1d654cd4a2 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') @@ -100,7 +100,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') + u_boot_console.run_command('tpm2 autostart') output = u_boot_console.run_command('echo $?') assert output.endswith('0') |