diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2019-02-13 02:42:05 +0300 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2019-04-09 01:58:55 +0300 |
commit | 6da70580af9612accf042b37564d73e787af39b4 (patch) | |
tree | d34765e2d838f5b139ab38d7f2b3f7bc43fe2a84 /tools/testing | |
parent | f1a0ba6cccff75d882204cae1f154f17620b3c4a (diff) | |
download | linux-6da70580af9612accf042b37564d73e787af39b4.tar.xz |
selftests/tpm2: Open tpm dev in unbuffered mode
In order to have control over how many bytes are read or written
the device needs to be opened in unbuffered mode.
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')
-rw-r--r-- | tools/testing/selftests/tpm2/tpm2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/tpm2/tpm2.py b/tools/testing/selftests/tpm2/tpm2.py index 6fc99ce025b5..828c18584624 100644 --- a/tools/testing/selftests/tpm2/tpm2.py +++ b/tools/testing/selftests/tpm2/tpm2.py @@ -358,9 +358,9 @@ class Client: self.flags = flags if (self.flags & Client.FLAG_SPACE) == 0: - self.tpm = open('/dev/tpm0', 'r+b') + self.tpm = open('/dev/tpm0', 'r+b', buffering=0) else: - self.tpm = open('/dev/tpmrm0', 'r+b') + self.tpm = open('/dev/tpmrm0', 'r+b', buffering=0) def close(self): self.tpm.close() |