mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
19b599f766
commit
2271b75fa9
4 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue