]> Git Repo - qemu.git/blobdiff - tests/test-io-channel-socket.c
iotests: allow Valgrind checking all QEMU processes
[qemu.git] / tests / test-io-channel-socket.c
index c253ae30f57a69d6f877064fc83ba5cb83079fd7..d43083a766713df3910da3fc1d24d23b6cd99535 100644 (file)
@@ -24,6 +24,7 @@
 #include "io-channel-helpers.h"
 #include "socket-helpers.h"
 #include "qapi/error.h"
+#include "qemu/module.h"
 
 
 static void test_io_channel_set_socket_bufs(QIOChannel *src,
@@ -56,7 +57,7 @@ static void test_io_channel_setup_sync(SocketAddress *listen_addr,
     QIOChannelSocket *lioc;
 
     lioc = qio_channel_socket_new();
-    qio_channel_socket_listen_sync(lioc, listen_addr, &error_abort);
+    qio_channel_socket_listen_sync(lioc, listen_addr, 1, &error_abort);
 
     if (listen_addr->type == SOCKET_ADDRESS_TYPE_INET) {
         SocketAddress *laddr = qio_channel_socket_get_local_address(
@@ -112,7 +113,7 @@ static void test_io_channel_setup_async(SocketAddress *listen_addr,
 
     lioc = qio_channel_socket_new();
     qio_channel_socket_listen_async(
-        lioc, listen_addr,
+        lioc, listen_addr, 1,
         test_io_channel_complete, &data, NULL, NULL);
 
     g_main_loop_run(data.loop);
@@ -565,7 +566,8 @@ int main(int argc, char **argv)
      * with either IPv4 or IPv6 disabled.
      */
     if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) {
-        return 1;
+        g_printerr("socket_check_protocol_support() failed\n");
+        goto end;
     }
 
     if (has_ipv4) {
@@ -594,5 +596,6 @@ int main(int argc, char **argv)
                     test_io_channel_unix_listen_cleanup);
 #endif /* _WIN32 */
 
+end:
     return g_test_run();
 }
This page took 0.024897 seconds and 4 git commands to generate.