]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/tpm2: Extend tests to cover partial reads
authorTadeusz Struk <tadeusz.struk@intel.com>
Tue, 12 Feb 2019 23:42:10 +0000 (15:42 -0800)
committerJames Morris <james.morris@microsoft.com>
Mon, 8 Apr 2019 22:58:55 +0000 (15:58 -0700)
commit01aed4e537a905907e12b2624773180ad4c10622
tree4430b05df94565df0e37455729911102c9b58421
parente28f9652ea8fe1126ceb2db75547e496ce311892
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>
tools/testing/selftests/tpm2/tpm2.py
tools/testing/selftests/tpm2/tpm2_tests.py