mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
test: add a test for the new tpm_auto_start() function
A prior patch adds a new API function for TPM2.0, which performs the full startup sequence of the TPM. Add a selftest for that. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
87bc11d5e2
commit
1b11de766f
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,11 @@ static int dm_test_tpm(struct unit_test_state *uts)
|
|||
ut_asserteq_str("init_done=0", buf);
|
||||
|
||||
ut_assertok(tpm_init(dev));
|
||||
/*
|
||||
* tpm auto start will rerun tpm_init, but handles the
|
||||
* -EBUSY return code internally.
|
||||
*/
|
||||
ut_assertok(tpm_auto_start(dev));
|
||||
|
||||
ut_assert(tpm_report_state(dev, buf, sizeof(buf)));
|
||||
ut_asserteq_str("init_done=1", buf);
|
||||
|
|
Loading…
Add table
Reference in a new issue