summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-30 15:56:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-30 15:56:00 +0100
commitec9fe956d5c728da770db5ec9bc429080ccb5043 (patch)
tree0923a1fc3feaafa115e329c518d6622fb44616dc /tests
parenta4b31047c851c9a84247a9cc634eca5f99f559a6 (diff)
parentaf35e5e1fb8c334498c61cb9a568719483955a8f (diff)
downloadfocaccia-qemu-ec9fe956d5c728da770db5ec9bc429080ccb5043.tar.gz
focaccia-qemu-ec9fe956d5c728da770db5ec9bc429080ccb5043.zip
Merge remote-tracking branch 'remotes/bonzini/small-fixes' into staging
* remotes/bonzini/small-fixes:
  tests/test-qmp-event: fix for GLib < 2.31
  serial: poll the serial console with G_IO_HUP

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qmp-event.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c
index cb1e4418ec..cb354e6e81 100644
--- a/tests/test-qmp-event.c
+++ b/tests/test-qmp-event.c
@@ -251,6 +251,12 @@ static void test_event_d(TestEventData *data,
 
 int main(int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2, 31, 0)
+    if (!g_thread_supported()) {
+       g_thread_init(NULL);
+    }
+#endif
+
     qmp_event_set_func_emit(event_test_emit);
 
     g_test_init(&argc, &argv, NULL);