Skip to content

Introduce basic test for pkg/tss#2722

Merged
chrisfenner merged 2 commits into
u-root:mainfrom
chrisfenner:main
Jul 18, 2023
Merged

Introduce basic test for pkg/tss#2722
chrisfenner merged 2 commits into
u-root:mainfrom
chrisfenner:main

Conversation

@chrisfenner
Copy link
Copy Markdown
Member

This change introduces support for running a pkg/tss test if there is a running TPM simulator. The TPM command and platform command ports must be passed to the test via command-line flags, otherwise the test will be skipped.

This change introduces a small, basic test for testing the Info() function. Other tests for PCR and NV functionality will come in later PRs.

A side-effect of this change is that the rest of the relevant packages inside go-tpm are pulled into the vendor directory so that other u-root users can use them. These packages are:

  • go-tpm/tpm2 (the new direct API)
  • go-tpm/tpm2/transport (the interface for all TPM transport types)
  • go-tpm/tpmutil/mssim (bindings for the TCP simulator)

This change introduces support for running a pkg/tss test if there is a
running TPM simulator. The TPM command and platform command ports must
be passed to the test via command-line flags, otherwise the test will be
script.

This change introduces a small, basic test for testing the Info()
function. Other tests for PCR and NV functionality will come in later
PRs.

A side-effect of this change is that the rest of the relevant packages
inside go-tpm are pulled into the vendor directory so that other u-root
users can use them. These packages are:
* go-tpm/tpm2 (the new direct API)
* go-tpm/tpm2/transport (the interface for all TPM transport types)
* go-tpm/tpmutil/mssim (bindings for the TCP simulator)

Signed-off-by: Chris Fenner <cfenn@google.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 18, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.19 🎉

Comparison is base (7df4529) 75.38% compared to head (fdfdef6) 75.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2722      +/-   ##
==========================================
+ Coverage   75.38%   75.58%   +0.19%     
==========================================
  Files         414      412       -2     
  Lines       42229    42103     -126     
==========================================
- Hits        31836    31823      -13     
+ Misses      10393    10280     -113     
Impacted Files Coverage Δ
pkg/tss/structures.go 0.00% <ø> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chrisfenner chrisfenner marked this pull request as ready for review July 18, 2023 18:13
@chrisfenner chrisfenner requested a review from hugelgupf July 18, 2023 19:34
@rminnich
Copy link
Copy Markdown
Member

very cool. If you can please set the label in future to awaiting reviewer so I make sure to notice.

@chrisfenner
Copy link
Copy Markdown
Member Author

very cool. If you can please set the label in future to awaiting reviewer so I make sure to notice.

Ah thanks, sorry I missed the existence of this label before. Thanks for taking a look!

@chrisfenner chrisfenner requested review from rminnich and removed request for hugelgupf July 18, 2023 20:52
@rminnich rminnich added the Awaiting author Waiting for new changes or feedback for author. label Jul 18, 2023
@chrisfenner
Copy link
Copy Markdown
Member Author

@hugelgupf is free to also take a look but removing him from the request to -- the amount of things taking up his time :)

@chrisfenner chrisfenner added Awaiting author Waiting for new changes or feedback for author. and removed Awaiting author Waiting for new changes or feedback for author. labels Jul 18, 2023
@chrisfenner chrisfenner merged commit 69f0fdd into u-root:main Jul 18, 2023
@chrisfenner chrisfenner removed the Awaiting author Waiting for new changes or feedback for author. label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants