summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-15 14:18:25 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-11-15 14:18:25 +0000
commitd835c6192495dc5b2c3a15a0761eb57d8d310828 (patch)
tree025c874118a019b682e1da29e71b8323ad62c248
parentbba390cb9ee31195f4b5d5b061831f5ca37614e2 (diff)
parent5e58b58c478bd00c807bd7814ccab148d49cc901 (diff)
downloadfocaccia-qemu-d835c6192495dc5b2c3a15a0761eb57d8d310828.tar.gz
focaccia-qemu-d835c6192495dc5b2c3a15a0761eb57d8d310828.zip
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-11-15-1' into staging
Merge tpm 2018/11/15 v1

# gpg: Signature made Thu 15 Nov 2018 14:03:45 GMT
# gpg:                using RSA key 75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* remotes/stefanberger/tags/pull-tpm-2018-11-15-1:
  tests: tpm: Use g_test_message rather than fprintf
  tpm: use loop iterator to set sts data field

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/tpm/tpm_tis.c2
-rw-r--r--tests/tpm-tests.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 12f5c9a759..d9322692ee 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 93a5beba01..582ec0cfd4 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;
     }