diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2019-02-12 15:42:10 -0800 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-04-08 15:58:55 -0700 |
commit | f1a0ba6cccff75d882204cae1f154f17620b3c4a (patch) | |
tree | 4430b05df94565df0e37455729911102c9b58421 /tools/testing/selftests/tpm2/tpm2.py | |
parent | be24b37e22c20cbaa891971616784dd0f35211e8 (diff) |
selftests/tpm2: Extend tests to cover partial reads
Three new tests added:
1. Send get random cmd, read header in 1st read, read the rest in second
read - expect success
2. Send get random cmd, read only part of the response, send another
get random command, read the response - expect success
3. Send get random cmd followed by another get random cmd, without
reading the first response - expect the second cmd to fail with -EBUSY
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'tools/testing/selftests/tpm2/tpm2.py')
-rw-r--r-- | tools/testing/selftests/tpm2/tpm2.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/tpm2/tpm2.py b/tools/testing/selftests/tpm2/tpm2.py index 40ea95ce2ead..6fc99ce025b5 100644 --- a/tools/testing/selftests/tpm2/tpm2.py +++ b/tools/testing/selftests/tpm2/tpm2.py @@ -22,6 +22,7 @@ TPM2_CC_UNSEAL = 0x015E TPM2_CC_FLUSH_CONTEXT = 0x0165 TPM2_CC_START_AUTH_SESSION = 0x0176 TPM2_CC_GET_CAPABILITY = 0x017A +TPM2_CC_GET_RANDOM = 0x017B TPM2_CC_PCR_READ = 0x017E TPM2_CC_POLICY_PCR = 0x017F TPM2_CC_PCR_EXTEND = 0x0182 |