]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: refactor event test to not run lock step
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 Jan 2020 10:55:48 +0000 (10:55 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 4 Feb 2020 14:00:44 +0000 (14:00 +0000)
commit32363452af6499b00834ea982c2b381a8d12f7d2
tree217ed349123faf35382ef7736ee1388c646f9edd
parentabab604e309c6d41dd4a36f96a8ff63e639d2991
tests: refactor event test to not run lock step

The current event loop test suite has two threads running
in lockstep. This was just about viable when we have full
control over the internal details of the event loop impl.
When we're using the GLib event loop though there are
things going on that we don't know about, such as use of
eventfd() file descriptors. This will break the assumptions
in the test suite, causing non-deterministic failures.

This change switches the event loop thread to run fully
asynchronously from the test suite cases. This is slightly
weaker validation, but the only way we can get a reliable
test suite.

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