Skip to content

kselftest-tpm2 tests are failing if TPM is owned #1542

Description

@nuclearcat

TPM2 might be owned by OS on some devices, for example Chromebooks, in this case they will not pass kselftest-tpm2 from debos, with error similar to this:

  # selftests: tpm2: test_smoke.sh
 2317 08:53:50.211041  # WARNING:esys:src/tss2-esys/api/Esys_Clear.c:291:Esys_Clear_Finish() Received TPM Error 
 2318 08:53:50.221050  # ERROR:esys:src/tss2-esys/api/Esys_Clear.c:97:Esys_Clear() Esys Finish ErrorCode (0x0000098e) 
 2319 08:53:50.230944  # ERROR: Esys_Clear(0x98E) - tpm:session(1):the authorization HMAC check failed and DA counter incremented
 2320 08:53:50.289963  # ERROR: Unable to run tpm2_clear
 2321 08:53:50.293086  
 2322 08:53:51.383355  # test_read_partial_overwrite (tpm2_tests.SmokeTest) ... ERROR
 2323 08:53:51.393418  # test_read_partial_resp (tpm2_tests.SmokeTest) ... ERROR
 2324 08:53:51.399467  # Exception ignored in: <function Client.__del__ at 0x7f69c37f5dc0>
 2325 08:53:51.402652  # Traceback (most recent call last):
 2326 08:53:51.412530  #   File "/lava-8137134/0/tests/1_kselftest-tpm2/automated/linux/kselftest/output/tpm2/tpm2.py", line 375, in __del__
 2327 08:53:51.416224  #     if self.tpm:
 2328 08:53:51.422443  # AttributeError: 'Client' object has no attribute 'tpm'
 2329 08:53:51.426104  # test_seal_with_auth (tpm2_tests.SmokeTest) ... ERROR
 2330 08:53:51.432442  # Exception ignored in: <function Client.__del__ at 0x7f69c37f5dc0>
 2331 08:53:51.435526  # Traceback (most recent call last):
 2332 08:53:51.439420  

This put under question reliability of all kselftest-tpm2 tests and pending PR related to them, such as:
#1534
#1034

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions