diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 12f5c9a7590a0650d3fa3c967a4f69286d28c5f8..d9322692ee6728e3b05757ec46e629c2832ef1e4 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -295,7 +295,7 @@ static void tpm_tis_request_completed(TPMIf *ti, int ret) if (s->cmd.selftest_done) { for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) { - s->loc[locty].sts |= TPM_TIS_STS_SELFTEST_DONE; + s->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE; } } diff --git a/tests/tpm-tests.c b/tests/tpm-tests.c index 93a5beba01654a48685b7abe600db87aadca1635..582ec0cfd4f767235397ea5f34b4207863014c55 100644 --- a/tests/tpm-tests.c +++ b/tests/tpm-tests.c @@ -22,7 +22,7 @@ static bool tpm_test_swtpm_skip(void) { if (!tpm_util_swtpm_has_tpm2()) { - fprintf(stderr, "swtpm not in PATH or missing --tpm2 support; "); + g_test_message("swtpm not in PATH or missing --tpm2 support"); return true; }