Skip to content

Commit 9aeb04b

Browse files
tpm/tests: Ignore test_root_key_check case
Current situation: 1. The test depends on a TPM being available in the system. 2. The connection settings to the TPM have to be changed to be in line with the TPM available in the system. Currently, the hardcoded settings are set to test with the software TPM enabled by the CI. Therefore: * Ignore the test by default. Each developer can run their tests according to the TPM configuration if it's needed. * Explicitly run the test in CI to make sure this is tested at least with the software TPM. Signed-off-by: Tomás González <[email protected]>
1 parent d0947a6 commit 9aeb04b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ci.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,11 @@ fi
396396
echo "Unit, doc and integration tests"
397397
RUST_BACKTRACE=1 cargo test $FEATURES
398398

399+
# Ignored unit tests that we want to manually run should be run here!
400+
if [ "$PROVIDER_NAME" = "tpm" ] || [ "$PROVIDER_NAME" = "all" ]; then
401+
RUST_BACKTRACE=1 cargo test $FEATURES -- --ignored test_root_key_check
402+
fi
403+
399404
# Removing any mappings or on disk keys left over from integration tests
400405
rm -rf mappings/
401406
rm -rf kim-mappings/

src/providers/tpm/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,12 @@ mod test {
535535
};
536536
use parsec_interface::requests::AuthType;
537537

538+
// This test can only be run with a TPM already available in your system.
539+
// Ignored unless specified
540+
#[ignore]
538541
#[test]
539542
fn test_root_key_check() {
543+
// Test configuration should be changed to adapt to your system's TPM
540544
let tcti = "mssim:host=127.0.0.1,port=2321";
541545
let owner_hierarchy_auth = "hex:74706d5f70617373";
542546
let endorsement_hierarchy_auth = "str:endorsement_pass".to_string();

0 commit comments

Comments
 (0)