tree: 174babc77dfaaa8710a7a98d23d1ef8b4aa00bef [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_derived_keys
  19. _test_tpm2_encrypted_state
  20. _test_tpm2_file_permissions
  21. _test_tpm2_getcap
  22. _test_tpm2_hashing
  23. _test_tpm2_hashing2
  24. _test_tpm2_hashing3
  25. _test_tpm2_init
  26. _test_tpm2_locality
  27. _test_tpm2_migration_key
  28. _test_tpm2_print_capabilities
  29. _test_tpm2_print_states
  30. _test_tpm2_probe
  31. _test_tpm2_resume_volatile
  32. _test_tpm2_save_load_encrypted_state
  33. _test_tpm2_save_load_state
  34. _test_tpm2_save_load_state_da_timeout
  35. _test_tpm2_savestate
  36. _test_tpm2_setbuffersize
  37. _test_tpm2_swtpm_bios
  38. _test_tpm2_volatilestate
  39. _test_tpm2_wrongorder
  40. _test_tpm_probe
  41. _test_volatilestate
  42. _test_wrongorder
  43. common
  44. create_certs.sh
  45. load_vtpm_proxy
  46. Makefile.am
  47. Readme.md
  48. softhsm_setup
  49. swtpm_setup.conf
  50. test_clientfds.py
  51. test_commandline
  52. test_common
  53. test_config.in
  54. test_ctrlchannel
  55. test_ctrlchannel2
  56. test_ctrlchannel3
  57. test_ctrlchannel4
  58. test_cuse
  59. test_encrypted_state
  60. test_getcap
  61. test_hashing
  62. test_hashing2
  63. test_init
  64. test_locality
  65. test_migration_key
  66. test_parameters
  67. test_print_capabilities
  68. test_print_states
  69. test_resume_volatile
  70. test_samples_create_tpmca
  71. test_save_load_encrypted_state
  72. test_save_load_state
  73. test_setbuffersize
  74. test_setdatafd.py
  75. test_swtpm_bios
  76. test_swtpm_cert
  77. test_swtpm_setup_create_cert
  78. test_swtpm_setup_file_backend
  79. test_swtpm_setup_misc
  80. test_swtpm_setup_overwrite
  81. test_tpm12
  82. test_tpm2_ctrlchannel2
  83. test_tpm2_derived_keys
  84. test_tpm2_encrypted_state
  85. test_tpm2_file_permissions
  86. test_tpm2_getcap
  87. test_tpm2_hashing
  88. test_tpm2_hashing2
  89. test_tpm2_hashing3
  90. test_tpm2_ibmtss2
  91. test_tpm2_init
  92. test_tpm2_locality
  93. test_tpm2_migration_key
  94. test_tpm2_parameters
  95. test_tpm2_partial_reads
  96. test_tpm2_print_capabilities
  97. test_tpm2_print_states
  98. test_tpm2_probe
  99. test_tpm2_resume_volatile
  100. test_tpm2_samples_create_tpmca.test
  101. test_tpm2_save_load_encrypted_state
  102. test_tpm2_save_load_state
  103. test_tpm2_save_load_state_2
  104. test_tpm2_save_load_state_2_block
  105. test_tpm2_save_load_state_2_linear
  106. test_tpm2_save_load_state_3
  107. test_tpm2_save_load_state_da_timeout
  108. test_tpm2_savestate
  109. test_tpm2_setbuffersize
  110. test_tpm2_swtpm_bios
  111. test_tpm2_swtpm_cert
  112. test_tpm2_swtpm_cert_ecc
  113. test_tpm2_swtpm_localca
  114. test_tpm2_swtpm_localca_pkcs11.test
  115. test_tpm2_swtpm_setup_create_cert
  116. test_tpm2_swtpm_setup_overwrite
  117. test_tpm2_volatilestate
  118. test_tpm2_vtpm_proxy
  119. test_tpm2_wrongorder
  120. test_tpm_probe
  121. test_volatilestate
  122. test_vtpm_proxy
  123. 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"