aboutsummaryrefslogtreecommitdiff
path: root/tests/tpm-emu.h
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-09-09 12:04:01 +0200
committerThomas Huth <thuth@redhat.com>2020-01-12 11:42:41 +0100
commit1e8a1fae7464ef79c9e50aa0f807d2c511be3c8e (patch)
tree80d1a4f0454b9a75c09461e69f969213350540ea /tests/tpm-emu.h
parent10ae5b303a0de07f0659a2c90d9c1266b3908b97 (diff)
test: Move qtests to a separate directory
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity. Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/tpm-emu.h')
-rw-r--r--tests/tpm-emu.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/tpm-emu.h b/tests/tpm-emu.h
deleted file mode 100644
index a4f1d64226..0000000000
--- a/tests/tpm-emu.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Minimal TPM emulator for TPM test cases
- *
- * Copyright (c) 2018 Red Hat, Inc.
- *
- * Authors:
- * Marc-André Lureau <marcandre.lureau@redhat.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef TESTS_TPM_EMU_H
-#define TESTS_TPM_EMU_H
-
-#define TPM_RC_FAILURE 0x101
-#define TPM2_ST_NO_SESSIONS 0x8001
-
-struct tpm_hdr {
- uint16_t tag;
- uint32_t len;
- uint32_t code; /*ordinal/error */
- char buffer[];
-} QEMU_PACKED;
-
-typedef struct TestState {
- GMutex data_mutex;
- GCond data_cond;
- bool data_cond_signal;
- SocketAddress *addr;
- QIOChannel *tpm_ioc;
- GThread *emu_tpm_thread;
- struct tpm_hdr *tpm_msg;
-} TestState;
-
-void tpm_emu_test_wait_cond(TestState *s);
-void *tpm_emu_ctrl_thread(void *data);
-
-#endif /* TESTS_TPM_EMU_H */