Skip to content

Commit

Permalink
tpm: selftest: cleanup after unseal with wrong auth/policy test
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
tstruk authored and Jarkko Sakkinen committed Dec 17, 2019
1 parent 8f84bdd commit a9920d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/testing/selftests/tpm2/test_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a9920d3

Please sign in to comment.