aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/tpm-emu.h
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2021-08-02 17:52:44 -0400
committerStefan Berger <stefanb@linux.ibm.com>2021-08-31 17:33:12 -0400
commit58edc32cfc796d56336a283aace5bdb5de25dc80 (patch)
treea776a408895a8fd1090becc37570e32d26217cdd /tests/qtest/tpm-emu.h
parent343776a68528a132ff9068bb0731f584b38ff2ea (diff)
tests: Use QMP to check whether a TPM device model is available
Use QMP to check whether a given TPM device model is available and if it is not the case then do not register the tests that require it. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20210802215246.1433175-9-stefanb@linux.ibm.com
Diffstat (limited to 'tests/qtest/tpm-emu.h')
-rw-r--r--tests/qtest/tpm-emu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/qtest/tpm-emu.h b/tests/qtest/tpm-emu.h
index fcb5d7a1d6..c33d99af37 100644
--- a/tests/qtest/tpm-emu.h
+++ b/tests/qtest/tpm-emu.h
@@ -22,6 +22,7 @@
#include "qemu/sockets.h"
#include "io/channel.h"
#include "sysemu/tpm.h"
+#include "libqos/libqtest.h"
struct tpm_hdr {
uint16_t tag;
@@ -50,5 +51,6 @@ typedef struct TPMTestState {
void tpm_emu_test_wait_cond(TPMTestState *s);
void *tpm_emu_ctrl_thread(void *data);
+bool tpm_model_is_available(const char *args, const char *tpm_if);
#endif /* TESTS_TPM_EMU_H */