tree: 3061b09b065266e4fcdca2b9734a1c39e053fd39 [path history] [tgz]
  1. data/
  2. patches/
  3. _test_encrypted_state
  4. _test_getcap
  5. _test_hashing
  6. _test_hashing2
  7. _test_init
  8. _test_locality
  9. _test_migration_key
  10. _test_migration_key_2
  11. _test_print_capabilities
  12. _test_print_states
  13. _test_resume_volatile
  14. _test_save_load_encrypted_state
  15. _test_save_load_state
  16. _test_setbuffersize
  17. _test_swtpm_bios
  18. _test_tpm2_avoid_da_lockout
  19. _test_tpm2_derived_keys
  20. _test_tpm2_encrypted_state
  21. _test_tpm2_file_permissions
  22. _test_tpm2_getcap
  23. _test_tpm2_hashing
  24. _test_tpm2_hashing2
  25. _test_tpm2_hashing3
  26. _test_tpm2_init
  27. _test_tpm2_locality
  28. _test_tpm2_migration_key
  29. _test_tpm2_print_capabilities
  30. _test_tpm2_print_states
  31. _test_tpm2_probe
  32. _test_tpm2_resume_volatile
  33. _test_tpm2_save_load_encrypted_state
  34. _test_tpm2_save_load_state
  35. _test_tpm2_save_load_state_da_timeout
  36. _test_tpm2_save_load_state_locking
  37. _test_tpm2_savestate
  38. _test_tpm2_setbuffersize
  39. _test_tpm2_swtpm_bios
  40. _test_tpm2_volatilestate
  41. _test_tpm2_wrongorder
  42. _test_tpm_probe
  43. _test_volatilestate
  44. _test_wrongorder
  45. common
  46. create_certs.sh
  47. load_vtpm_proxy
  48. Makefile.am
  49. Readme.md
  50. softhsm_setup
  51. swtpm_setup.conf
  52. test_clientfds.py
  53. test_commandline
  54. test_common
  55. test_config.in
  56. test_ctrlchannel
  57. test_ctrlchannel2
  58. test_ctrlchannel3
  59. test_ctrlchannel4
  60. test_cuse
  61. test_encrypted_state
  62. test_getcap
  63. test_hashing
  64. test_hashing2
  65. test_init
  66. test_locality
  67. test_migration_key
  68. test_parameters
  69. test_print_capabilities
  70. test_print_states
  71. test_resume_volatile
  72. test_samples_create_tpmca
  73. test_save_load_encrypted_state
  74. test_save_load_state
  75. test_setbuffersize
  76. test_setdatafd.py
  77. test_swtpm_bios
  78. test_swtpm_cert
  79. test_swtpm_setup_create_cert
  80. test_swtpm_setup_file_backend
  81. test_swtpm_setup_misc
  82. test_swtpm_setup_overwrite
  83. test_tpm12
  84. test_tpm2_avoid_da_lockout
  85. test_tpm2_chroot_chardev
  86. test_tpm2_chroot_cuse
  87. test_tpm2_chroot_socket
  88. test_tpm2_ctrlchannel2
  89. test_tpm2_ctrlchannel3
  90. test_tpm2_derived_keys
  91. test_tpm2_encrypted_state
  92. test_tpm2_file_permissions
  93. test_tpm2_getcap
  94. test_tpm2_hashing
  95. test_tpm2_hashing2
  96. test_tpm2_hashing3
  97. test_tpm2_ibmtss2
  98. test_tpm2_init
  99. test_tpm2_locality
  100. test_tpm2_migration_key
  101. test_tpm2_parameters
  102. test_tpm2_partial_reads
  103. test_tpm2_print_capabilities
  104. test_tpm2_print_states
  105. test_tpm2_probe
  106. test_tpm2_resume_volatile
  107. test_tpm2_samples_create_tpmca.test
  108. test_tpm2_save_load_encrypted_state
  109. test_tpm2_save_load_state
  110. test_tpm2_save_load_state_2
  111. test_tpm2_save_load_state_2_block
  112. test_tpm2_save_load_state_2_linear
  113. test_tpm2_save_load_state_3
  114. test_tpm2_save_load_state_da_timeout
  115. test_tpm2_save_load_state_locking
  116. test_tpm2_savestate
  117. test_tpm2_setbuffersize
  118. test_tpm2_swtpm_bios
  119. test_tpm2_swtpm_cert
  120. test_tpm2_swtpm_cert_ecc
  121. test_tpm2_swtpm_localca
  122. test_tpm2_swtpm_localca_pkcs11.test
  123. test_tpm2_swtpm_setup_create_cert
  124. test_tpm2_swtpm_setup_overwrite
  125. test_tpm2_volatilestate
  126. test_tpm2_vtpm_proxy
  127. test_tpm2_wrongorder
  128. test_tpm_probe
  129. test_volatilestate
  130. test_vtpm_proxy
  131. test_wrongorder
tests/Readme.md

This directory contains the swtpm tests.

To run the tests you need to build swtpm first and then you can run the tests using the following command line:

SWTPM_TEST_EXPENSIVE=1 SWTPM_TEST_STORE_VOLATILE=1 SWTPM_TEST_IBMTSS2=1 make check

You may omit the environment variables if you don't want to run the more time-consuming tests.

SWTPM_TEST_EXPENSIVE=1 enables the following tests:

  • test_tpm12
  • test_tpm2_ibmtss2

SWTPM_TEST_STORE_VOLATILE=1 enables storing and restoring of the volatile state at every step of the test_tpm2_ibmtss2 test. This environment variable only has an effect if SWTPM_TEST_EXPENSIVE=1 is set.

SWTPM_TEST_IBMTSS2=1 enables the following tests

  • test_tpm2_save_load_state_2
  • test_tpm2_save_load_state_3

Some tests require root rights, especially those involving the CUSE TPM and the vTPM proxy device. To run these and all the other ones you can use the following command line:

sudo bash -c "SWTPM_TEST_EXPENSIVE=1 SWTPM_TEST_STORE_VOLATILE=1 SWTPM_TEST_IBMTSS2=1 make check"