[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 05/18] io: wait for incoming client in socket tes
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PATCH v2 05/18] io: wait for incoming client in socket test |
Date: |
Thu, 10 Mar 2016 17:26:52 +0000 |
Exercise the GSource code for server sockets by calling
qio_channel_wait() prior to accepting the incoming client.
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
---
tests/test-io-channel-socket.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index 4c16da1..ae665f5 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -114,6 +114,7 @@ static void test_io_channel_setup_sync(SocketAddress
*listen_addr,
QIO_CHANNEL_SOCKET(*src), connect_addr, &error_abort);
qio_channel_set_delay(*src, false);
+ qio_channel_wait(QIO_CHANNEL(lioc), G_IO_IN);
*dst = QIO_CHANNEL(qio_channel_socket_accept(lioc, &error_abort));
g_assert(*dst);
@@ -181,6 +182,7 @@ static void test_io_channel_setup_async(SocketAddress
*listen_addr,
g_assert(!data.err);
+ qio_channel_wait(QIO_CHANNEL(lioc), G_IO_IN);
*dst = QIO_CHANNEL(qio_channel_socket_accept(lioc, &error_abort));
g_assert(*dst);
--
2.5.0
- [Qemu-devel] [PATCH v2 00/18] Multiple fixes & improvements to QIOChannel & Win32, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 01/18] osdep: fix socket_error() to work with Mingw64, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 03/18] io: initialize sockets in test program, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 02/18] io: use bind() to check for IPv4/6 availability, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 06/18] io: set correct error object in background reader test thread, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 07/18] io: assert errors before asserting content in I/O test, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 05/18] io: wait for incoming client in socket test,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH v2 04/18] io: bind to socket before creating QIOChannelSocket, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 12/18] io: remove checking of EWOULDBLOCK, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 08/18] io: fix copy+paste mistake in socket error message, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 09/18] io: pass HANDLE to g_source_add_poll on Win32, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 11/18] io: use qemu_accept to ensure SOCK_CLOEXEC is set, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 13/18] io: implement socket watch for win32 using WSAEventSelect+select, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 10/18] io: introduce qio_channel_create_socket_watch, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 14/18] char: remove qemu_chr_finish_socket_connection method, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 16/18] char: remove qemu_chr_open_socket_fd method, Daniel P. Berrange, 2016/03/10
- [Qemu-devel] [PATCH v2 15/18] char: remove socket_try_connect method, Daniel P. Berrange, 2016/03/10