tree: 5da49369f88c3980d5965af70e0fbf744c0d1c41 [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_pcap
  30. _test_tpm2_print_capabilities
  31. _test_tpm2_print_states
  32. _test_tpm2_probe
  33. _test_tpm2_resume_volatile
  34. _test_tpm2_save_load_encrypted_state
  35. _test_tpm2_save_load_state
  36. _test_tpm2_save_load_state_da_timeout
  37. _test_tpm2_save_load_state_locking
  38. _test_tpm2_savestate
  39. _test_tpm2_setbuffersize
  40. _test_tpm2_swtpm_bios
  41. _test_tpm2_volatilestate
  42. _test_tpm2_wrongorder
  43. _test_tpm_probe
  44. _test_volatilestate
  45. _test_wrongorder
  46. common
  47. create_certs.sh
  48. fileinstall
  49. installed-runner.sh
  50. load_vtpm_proxy
  51. Makefile.am
  52. Readme.md
  53. sed-inplace
  54. softhsm_setup
  55. swtpm_setup.conf
  56. test_clientfds.py
  57. test_commandline
  58. test_common
  59. test_config.in
  60. test_ctrlchannel
  61. test_ctrlchannel2
  62. test_ctrlchannel3
  63. test_ctrlchannel4
  64. test_cuse
  65. test_encrypted_state
  66. test_getcap
  67. test_hashing
  68. test_hashing2
  69. test_init
  70. test_locality
  71. test_migration_key
  72. test_parameters
  73. test_print_capabilities
  74. test_print_states
  75. test_resume_volatile
  76. test_samples_create_tpmca
  77. test_save_load_encrypted_state
  78. test_save_load_state
  79. test_setbuffersize
  80. test_setdatafd.py
  81. test_swtpm_bios
  82. test_swtpm_cert
  83. test_swtpm_setup_create_cert
  84. test_swtpm_setup_file_backend
  85. test_swtpm_setup_misc
  86. test_swtpm_setup_overwrite
  87. test_tpm12
  88. test_tpm2_avoid_da_lockout
  89. test_tpm2_chroot_chardev
  90. test_tpm2_chroot_cuse
  91. test_tpm2_chroot_socket
  92. test_tpm2_ctrlchannel2
  93. test_tpm2_ctrlchannel3
  94. test_tpm2_derived_keys
  95. test_tpm2_encrypted_state
  96. test_tpm2_file_permissions
  97. test_tpm2_getcap
  98. test_tpm2_hashing
  99. test_tpm2_hashing2
  100. test_tpm2_hashing3
  101. test_tpm2_ibmtss2
  102. test_tpm2_init
  103. test_tpm2_libtpms_versions_profiles
  104. test_tpm2_locality
  105. test_tpm2_migration_key
  106. test_tpm2_parameters
  107. test_tpm2_partial_reads
  108. test_tpm2_pcap
  109. test_tpm2_print_capabilities
  110. test_tpm2_print_states
  111. test_tpm2_probe
  112. test_tpm2_profile_disabled_features
  113. test_tpm2_resume_volatile
  114. test_tpm2_samples_create_tpmca.test
  115. test_tpm2_save_load_encrypted_state
  116. test_tpm2_save_load_state
  117. test_tpm2_save_load_state_2
  118. test_tpm2_save_load_state_2_block
  119. test_tpm2_save_load_state_2_linear
  120. test_tpm2_save_load_state_3
  121. test_tpm2_save_load_state_da_timeout
  122. test_tpm2_save_load_state_locking
  123. test_tpm2_savestate
  124. test_tpm2_setbuffersize
  125. test_tpm2_swtpm_bios
  126. test_tpm2_swtpm_cert
  127. test_tpm2_swtpm_cert_ecc
  128. test_tpm2_swtpm_localca
  129. test_tpm2_swtpm_localca_pkcs11.test
  130. test_tpm2_swtpm_setup_create_cert
  131. test_tpm2_swtpm_setup_overwrite
  132. test_tpm2_swtpm_setup_profile
  133. test_tpm2_swtpm_setup_profile_name
  134. test_tpm2_volatilestate
  135. test_tpm2_vtpm_proxy
  136. test_tpm2_wrongorder
  137. test_tpm_probe
  138. test_volatilestate
  139. test_vtpm_proxy
  140. 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_PROFILE='{"Name":"default-v1"}' \
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
  • test_tpm2_libtpms_versions_profiles

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
  • test_tpm2_libtpms_versions_profiles

SWTPM_TEST_PROFILE allows to set a profile for the following tests:

  • test_tpm2_ibmtss2

Note: The test suite will terminate with an error if the profile disables an algorithm that it requires.

To run against an installed IBM TSS test suite, you may set the SWTPM_TEST_IBMTSS to the location of the test suite, such as /usr/libexec/installed-tests/ibmtss.

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"