summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2019-12-12 09:48:59 -0800
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2019-12-17 12:20:15 +0200
commita9920d3bad40201ee8ab1da36bee4674f7e50d69 (patch)
treebf8894815b91654303d4872950fdfbc54344b125 /tools
parent8f84bddcfac9117564721ead494db7a604fdf861 (diff)
downloadlinux-a9920d3bad40201ee8ab1da36bee4674f7e50d69.tar.bz2
tpm: selftest: cleanup after unseal with wrong auth/policy test
Unseal with wrong auth or wrong policy test affects DA lockout and eventually causes the tests to fail with: "ProtocolError: TPM_RC_LOCKOUT: rc=0x00000921" when the tests run multiple times. Send tpm clear command after the test to reset the DA counters. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/tpm2/test_smoke.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/tpm2/test_smoke.sh b/tools/testing/selftests/tpm2/test_smoke.sh
index cb54ab637ea6..8155c2ea7ccb 100755
--- a/tools/testing/selftests/tpm2/test_smoke.sh
+++ b/tools/testing/selftests/tpm2/test_smoke.sh
@@ -3,3 +3,8 @@
python -m unittest -v tpm2_tests.SmokeTest
python -m unittest -v tpm2_tests.AsyncTest
+
+CLEAR_CMD=$(which tpm2_clear)
+if [ -n $CLEAR_CMD ]; then
+ tpm2_clear -T device
+fi