[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/25] qtest: enable vnc-display test on win32
From: |
marcandre . lureau |
Subject: |
[PULL 24/25] qtest: enable vnc-display test on win32 |
Date: |
Mon, 13 Mar 2023 15:43:34 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Now that qtest_qmp_add_client() works on win32, we can enable the VNC
test.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230306122751.2355515-11-marcandre.lureau@redhat.com>
---
tests/qtest/vnc-display-test.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/vnc-display-test.c b/tests/qtest/vnc-display-test.c
index e52a4326ec..f8933b0761 100644
--- a/tests/qtest/vnc-display-test.c
+++ b/tests/qtest/vnc-display-test.c
@@ -19,7 +19,7 @@ typedef struct Test {
GMainLoop *loop;
} Test;
-#if !defined(WIN32) && !defined(CONFIG_DARWIN)
+#if !defined(CONFIG_DARWIN)
static void on_vnc_error(VncConnection* self,
const char* msg)
@@ -38,10 +38,7 @@ static void on_vnc_auth_failure(VncConnection *self,
static bool
test_setup(Test *test)
{
-#ifdef WIN32
- g_test_skip("Not supported on Windows yet");
- return false;
-#elif defined(CONFIG_DARWIN)
+#if defined(CONFIG_DARWIN)
g_test_skip("Broken on Darwin");
return false;
#else
@@ -59,7 +56,12 @@ test_setup(Test *test)
g_signal_connect(test->conn, "vnc-auth-failure",
G_CALLBACK(on_vnc_auth_failure), NULL);
vnc_connection_set_auth_type(test->conn, VNC_CONNECTION_AUTH_NONE);
+
+#ifdef WIN32
+ vnc_connection_open_fd(test->conn, _get_osfhandle(pair[0]));
+#else
vnc_connection_open_fd(test->conn, pair[0]);
+#endif
test->loop = g_main_loop_new(NULL, FALSE);
return true;
--
2.39.2
- [PULL 15/25] win32: replace closesocket() with close() wrapper, (continued)
- [PULL 15/25] win32: replace closesocket() with close() wrapper, marcandre . lureau, 2023/03/13
- [PULL 16/25] tests: fix path separator, use g_build_filename(), marcandre . lureau, 2023/03/13
- [PULL 17/25] char: do not double-close fd when failing to add client, marcandre . lureau, 2023/03/13
- [PULL 18/25] tests/docker: fix a win32 error due to portability, marcandre . lureau, 2023/03/13
- [PULL 19/25] osdep: implement qemu_socketpair() for win32, marcandre . lureau, 2023/03/13
- [PULL 20/25] qmp: 'add_client' actually expects sockets, marcandre . lureau, 2023/03/13
- [PULL 21/25] monitor: release the lock before calling close(), marcandre . lureau, 2023/03/13
- [PULL 22/25] qmp: add 'get-win32-socket', marcandre . lureau, 2023/03/13
- [PULL 23/25] libqtest: make qtest_qmp_add_client work on win32, marcandre . lureau, 2023/03/13
- [PULL 25/25] QMP/HMP: only actually implement getfd on CONFIG_POSIX, marcandre . lureau, 2023/03/13
- [PULL 24/25] qtest: enable vnc-display test on win32,
marcandre . lureau <=
- Re: [PULL 00/25] Win socket patches, Marc-André Lureau, 2023/03/13
- Re: [PULL 00/25] Win socket patches, Marc-André Lureau, 2023/03/13