]> xenbits.xensource.com Git - libvirt.git/commit
tests: fix deadlock in eventtest
authorPavel Hrdina <phrdina@redhat.com>
Thu, 6 Feb 2020 12:00:25 +0000 (13:00 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 6 Feb 2020 12:41:03 +0000 (13:41 +0100)
commit933ad860029990449d30018486b58e9b95edff70
tree0c25a46b96de5e4e83b56fa85d8e84eba80dfbd9
parent5e35d4a5193a10f25c51166ff05bf44d84f4b438
tests: fix deadlock in eventtest

There is a race deadlock in eventtest after the recent rewrite to drop
GNULIB from libvirt code base.

The issue happens when the callbacks testPipeReader() or testTimer()
are called before waitEvents() starts waiting on `eventThreadCond`.
It will never happen because the callbacks are already done and there
is nothing that will signal the condition again.

Reported-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/eventtest.c