aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-09-04 15:38:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-09-04 15:38:27 +0100
commitda9e0c27214733888d6366794f33c4c2db348dc1 (patch)
tree6360f112aca29244f7187c3442e034f7b5240247 /tests
parentf884294bd76eb89127d311627d8de1b70ec9ba54 (diff)
parent0705e56496d2b155b5796c6b28d4110e5bcbd5d8 (diff)
downloadqemu-da9e0c27214733888d6366794f33c4c2db348dc1.zip
qemu-da9e0c27214733888d6366794f33c4c2db348dc1.tar.gz
qemu-da9e0c27214733888d6366794f33c4c2db348dc1.tar.bz2
Merge remote-tracking branch 'remotes/juanquintela/tags/fail-pull-request' into staging
Fix multifd with big number of channels # gpg: Signature made Wed 04 Sep 2019 07:28:31 BST # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/fail-pull-request: multifd: Use number of channels as listen backlog socket: Add num connections to qio_net_listener_open_sync() socket: Add num connections to qio_channel_socket_async() socket: Add num connections to qio_channel_socket_sync() socket: Add backlog parameter to socket_listen Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-char.c4
-rw-r--r--tests/test-io-channel-socket.c4
-rw-r--r--tests/test-util-sockets.c12
-rw-r--r--tests/tpm-emu.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/test-char.c b/tests/test-char.c
index b56e43c..f3ebdff 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -667,7 +667,7 @@ char_socket_addr_to_opt_str(SocketAddress *addr, bool fd_pass,
char *optstr;
g_assert(!reconnect);
if (is_listen) {
- qio_channel_socket_listen_sync(ioc, addr, &error_abort);
+ qio_channel_socket_listen_sync(ioc, addr, 1, &error_abort);
} else {
qio_channel_socket_connect_sync(ioc, addr, &error_abort);
}
@@ -892,7 +892,7 @@ static void char_socket_client_test(gconstpointer opaque)
*/
ioc = qio_channel_socket_new();
g_assert_nonnull(ioc);
- qio_channel_socket_listen_sync(ioc, config->addr, &error_abort);
+ qio_channel_socket_listen_sync(ioc, config->addr, 1, &error_abort);
addr = qio_channel_socket_get_local_address(ioc, &error_abort);
g_assert_nonnull(addr);
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index d172f30..d43083a 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -57,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(
@@ -113,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);
diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
index e2a3a8a..8ce55ef 100644
--- a/tests/test-util-sockets.c
+++ b/tests/test-util-sockets.c
@@ -93,7 +93,7 @@ static void test_socket_fd_pass_name_good(void)
g_assert_cmpint(fd, !=, mon_fd);
close(fd);
- fd = socket_listen(&addr, &error_abort);
+ fd = socket_listen(&addr, 1, &error_abort);
g_assert_cmpint(fd, !=, -1);
g_assert_cmpint(fd, !=, mon_fd);
close(fd);
@@ -124,7 +124,7 @@ static void test_socket_fd_pass_name_bad(void)
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
- fd = socket_listen(&addr, &err);
+ fd = socket_listen(&addr, 1, &err);
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
@@ -151,7 +151,7 @@ static void test_socket_fd_pass_name_nomon(void)
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
- fd = socket_listen(&addr, &err);
+ fd = socket_listen(&addr, 1, &err);
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
@@ -174,7 +174,7 @@ static void test_socket_fd_pass_num_good(void)
fd = socket_connect(&addr, &error_abort);
g_assert_cmpint(fd, ==, sfd);
- fd = socket_listen(&addr, &error_abort);
+ fd = socket_listen(&addr, 1, &error_abort);
g_assert_cmpint(fd, ==, sfd);
g_free(addr.u.fd.str);
@@ -197,7 +197,7 @@ static void test_socket_fd_pass_num_bad(void)
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
- fd = socket_listen(&addr, &err);
+ fd = socket_listen(&addr, 1, &err);
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
@@ -220,7 +220,7 @@ static void test_socket_fd_pass_num_nocli(void)
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
- fd = socket_listen(&addr, &err);
+ fd = socket_listen(&addr, 1, &err);
g_assert_cmpint(fd, ==, -1);
error_free_or_abort(&err);
diff --git a/tests/tpm-emu.c b/tests/tpm-emu.c
index 125e697..c43ac4a 100644
--- a/tests/tpm-emu.c
+++ b/tests/tpm-emu.c
@@ -76,7 +76,7 @@ void *tpm_emu_ctrl_thread(void *data)
QIOChannelSocket *lioc = qio_channel_socket_new();
QIOChannel *ioc;
- qio_channel_socket_listen_sync(lioc, s->addr, &error_abort);
+ qio_channel_socket_listen_sync(lioc, s->addr, 1, &error_abort);
g_mutex_lock(&s->data_mutex);
s->data_cond_signal = true;