From dc555baf79ac9d931da480b2ffa809dc44103b7e Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Tue, 30 Jan 2024 16:26:58 +0200 Subject: [PATCH] Add TPM testing steps to fedora, and scheduling. --- ...=> jumpstarter-pr-push-and-scheduled.yaml} | 2 ++ fedora-rawhide/test-tpm-on-latest-raw.yaml | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) rename .github/workflows/{jumpstarter-gh-actions.yaml => jumpstarter-pr-push-and-scheduled.yaml} (97%) diff --git a/.github/workflows/jumpstarter-gh-actions.yaml b/.github/workflows/jumpstarter-pr-push-and-scheduled.yaml similarity index 97% rename from .github/workflows/jumpstarter-gh-actions.yaml rename to .github/workflows/jumpstarter-pr-push-and-scheduled.yaml index 7f6424f..de1d4f1 100644 --- a/.github/workflows/jumpstarter-gh-actions.yaml +++ b/.github/workflows/jumpstarter-pr-push-and-scheduled.yaml @@ -4,6 +4,8 @@ on: push: branches: - main + schedule: + - cron: "30 8 * * *" pull_request: permissions: diff --git a/fedora-rawhide/test-tpm-on-latest-raw.yaml b/fedora-rawhide/test-tpm-on-latest-raw.yaml index 7b93ed7..1c33748 100644 --- a/fedora-rawhide/test-tpm-on-latest-raw.yaml +++ b/fedora-rawhide/test-tpm-on-latest-raw.yaml @@ -61,6 +61,28 @@ steps: this: "Complete!" timeout: 500 + - comment: "Verifying TPM interactions via tpm2 tools" + - send: + this: + - "tpm2_createprimary -C e -c primary.ctx\n" + - "tpm2_create -G rsa -u key.pub -r key.priv -C primary.ctx\n" + - "tpm2_load -C primary.ctx -u key.pub -r key.priv -c key.ctx\n" + - "echo my message > message.dat\n" + - "tpm2_sign -c key.ctx -g sha256 -o sig.rssa message.dat\n" + - "tpm2_verifysignature -c key.ctx -g sha256 -s sig.rssa -m message.dat\n" + - "echo result: $?\n" + + - expect: + this: "value: fixedtpm|fixedparent|sensitivedataorigin|userwithauth|restricted|decrypt" + - expect: + this: "fixedtpm|fixedparent|sensitivedataorigin|userwithauth|decrypt|sign" + - expect: + this: "name: " + - expect: + this: "result: 0" + - expect: + this: "# " + cleanup: - send: this: