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