You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/setup_swtpm.sh: Add script to setup temporary TPM
Add the tests/setup_swtpm.sh script which setup a Software TPM in a
temporary directory, starts the swtpm socket, and sets the environment
TCTI accordingly.
This allows the tests to be executed locally, even with the "testing"
feature.
Unfortunately, it is not possible to cleanup some of the transient
objects created during tests, being necessary to cleanup manually
between runs by running:
$ tpm2_flushcontext -t -l -s
Another caveat is that the tests need to run on a single thread to avoid
test cases that create objects to run in parallel, which can fill up the
TPM memory with transient object contexts. For this, please run the
tests on a single thread:
$ cargo test --features=testing -- --test-threads=1
The swtpm socket process is stopped when exiting from the started shell.
Fixes: #259
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
0 commit comments