[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 10/11] qtest: enable vnc-display test on win32
From: |
marcandre . lureau |
Subject: |
[PATCH v4 10/11] qtest: enable vnc-display test on win32 |
Date: |
Mon, 6 Mar 2023 16:27:50 +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>
---
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
- Re: [PATCH v4 07/11] qapi/gen: run C code through clang-format, if possible, (continued)
[PATCH v4 08/11] qmp: add 'get-win32-socket', marcandre . lureau, 2023/03/06
[PATCH v4 11/11] QMP/HMP: only actually implement getfd on CONFIG_POSIX, marcandre . lureau, 2023/03/06
[PATCH v4 09/11] libqtest: make qtest_qmp_add_client work on win32, marcandre . lureau, 2023/03/06
[PATCH v4 10/11] qtest: enable vnc-display test on win32,
marcandre . lureau <=