diff options
| author | Stefan Berger | 2018-09-07 17:47:06 +0200 |
|---|---|---|
| committer | Stefan Berger | 2018-09-07 22:37:47 +0200 |
| commit | 2271b75fa9019a9ba10d38ea2cf53a2032b1d8fd (patch) | |
| tree | a8fd73afcb4cafbc7223803408a571737648b930 /tests/tpm-emu.h | |
| parent | Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' i... (diff) | |
| download | qemu-2271b75fa9019a9ba10d38ea2cf53a2032b1d8fd.tar.gz qemu-2271b75fa9019a9ba10d38ea2cf53a2032b1d8fd.tar.xz qemu-2271b75fa9019a9ba10d38ea2cf53a2032b1d8fd.zip | |
tests: Fix signalling race condition in TPM tests
This patch fixes a race condition and test failure where the main process
waits for the signal of a thread but the thread already sent that signal
via a condition. Since these signals are non-sticky, we need to introduce a
separate variable to make this signal sticky.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/tpm-emu.h')
| -rw-r--r-- | tests/tpm-emu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/tpm-emu.h b/tests/tpm-emu.h index 08f902485e..8eb802a79e 100644 --- a/tests/tpm-emu.h +++ b/tests/tpm-emu.h @@ -26,6 +26,7 @@ struct tpm_hdr { typedef struct TestState { GMutex data_mutex; GCond data_cond; + bool data_cond_signal; SocketAddress *addr; QIOChannel *tpm_ioc; GThread *emu_tpm_thread; |
