[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 20/26] tests: fix test-util-sockets.c
From: |
Yonggang Luo |
Subject: |
[PATCH v10 20/26] tests: fix test-util-sockets.c |
Date: |
Wed, 16 Sep 2020 01:12:28 +0800 |
Fixes following errors:
Running test test-util-sockets
ERROR test-util-sockets - missing test plan
# Start of name tests
**
ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion
failed (fd != -1): (-1 != -1)
Bail out! ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good:
assertion failed (fd != -1): (-1 != -1)
First should call to qemu_init_main_loop before socket_init,
then on win32 doesn't support for SOCKET_ADDRESS_TYPE_FD socket type
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/test-util-sockets.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
index af9f5c0c70..1bbb16d9b1 100644
--- a/tests/test-util-sockets.c
+++ b/tests/test-util-sockets.c
@@ -75,7 +75,7 @@ int monitor_vprintf(Monitor *mon, const char *fmt, va_list
ap) { abort(); }
void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) {}
void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp) {}
-
+#ifndef _WIN32
static void test_socket_fd_pass_name_good(void)
{
SocketAddress addr;
@@ -227,6 +227,7 @@ static void test_socket_fd_pass_num_nocli(void)
g_free(addr.u.fd.str);
}
+#endif
#ifdef __linux__
static gchar *abstract_sock_name;
@@ -321,6 +322,7 @@ int main(int argc, char **argv)
{
bool has_ipv4, has_ipv6;
+ qemu_init_main_loop(&error_abort);
socket_init();
g_test_init(&argc, &argv, NULL);
@@ -340,6 +342,7 @@ int main(int argc, char **argv)
test_fd_is_socket_bad);
g_test_add_func("/util/socket/is-socket/good",
test_fd_is_socket_good);
+#ifndef _WIN32
g_test_add_func("/socket/fd-pass/name/good",
test_socket_fd_pass_name_good);
g_test_add_func("/socket/fd-pass/name/bad",
@@ -352,6 +355,7 @@ int main(int argc, char **argv)
test_socket_fd_pass_num_bad);
g_test_add_func("/socket/fd-pass/num/nocli",
test_socket_fd_pass_num_nocli);
+#endif
}
#ifdef __linux__
--
2.28.0.windows.1
- [PATCH v10 08/26] tests: test-replication disable /replication/secondary/* on msys2/mingw., (continued)
- [PATCH v10 08/26] tests: test-replication disable /replication/secondary/* on msys2/mingw., Yonggang Luo, 2020/09/15
- [PATCH v10 06/26] tests: disable /char/stdio/* tests in test-char.c on win32, Yonggang Luo, 2020/09/15
- [PATCH v10 02/26] ci: fixes msys2 build by upgrading capstone to 4.0.2, Yonggang Luo, 2020/09/15
- [PATCH v10 07/26] tests: Fixes test-replication.c on msys2/mingw., Yonggang Luo, 2020/09/15
- [PATCH v10 09/26] osdep: file locking functions are not available on Win32, Yonggang Luo, 2020/09/15
- [PATCH v10 16/26] tests: Convert g_free to g_autofree macro in test-logging.c, Yonggang Luo, 2020/09/15
- [PATCH v10 03/26] configure: Fixes ncursesw detection under msys2/mingw and enable curses, Yonggang Luo, 2020/09/15
- [PATCH v10 04/26] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS., Yonggang Luo, 2020/09/15
- [PATCH v10 01/26] rcu: Implement drain_call_rcu, Yonggang Luo, 2020/09/15
- [PATCH v10 05/26] curses: Fixes curses compiling errors., Yonggang Luo, 2020/09/15
- [PATCH v10 20/26] tests: fix test-util-sockets.c,
Yonggang Luo <=
- [PATCH v10 17/26] tests: Fixes test-io-channel-socket.c tests under msys2/mingw, Yonggang Luo, 2020/09/15
- [PATCH v10 18/26] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c, Yonggang Luo, 2020/09/15
- [PATCH v10 21/26] tests: Fixes test-qdev-global-props.c, Yonggang Luo, 2020/09/15
- [PATCH v10 19/26] tests: Fixes test-io-channel-file by mask only owner file state mask bits, Yonggang Luo, 2020/09/15
- [PATCH v10 22/26] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full, Yonggang Luo, 2020/09/15
- [PATCH v10 23/26] meson: upgrade meson for execute custom ninjatool under msys2 properly, Yonggang Luo, 2020/09/15
- [PATCH v10 24/26] ci: Enable msys2 ci in cirrus, Yonggang Luo, 2020/09/15
- [PATCH v10 25/26] block: Fixes nfs compiling error on msys2/mingw, Yonggang Luo, 2020/09/15
- [PATCH v10 26/26] block: enable libnfs on msys2/mingw in cirrus.yml, Yonggang Luo, 2020/09/15