[glib-networking/rufferson/openssl/tests/other] Skip close and read errors on Win32



commit 3786c512c60a502279b7491e5368debe6d1c3de9
Author: Ruslan N. Marchenko <me ruff mobi>
Date:   Mon Jul 6 15:45:28 2020 +0200

    Skip close and read errors on Win32

 tls/tests/connection.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 1223f87..39bb679 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -513,12 +513,16 @@ on_input_read_finish (GObject        *object,
                                                NULL, &test->read_error);
   if (!test->read_error)
     {
+#ifdef G_OS_WIN32
+      g_test_skip ("write-close-read gives intermittent errors on Win32");
+#else
       g_assert_nonnull (line);
 
       check = g_strdup (TEST_DATA);
       g_strstrip (check);
       g_assert_cmpstr (line, ==, check);
       g_free (check);
+#endif
       g_free (line);
     }
 
@@ -1215,11 +1219,18 @@ test_client_auth_fail_missing_client_private_key (TestConnection *test,
   /* All validation in this test */
   g_tls_client_connection_set_validation_flags (G_TLS_CLIENT_CONNECTION (test->client_connection),
                                                 G_TLS_CERTIFICATE_VALIDATE_ALL);
+#if BACKEND_IS_OPENSSL && defined(G_OS_WIN32)
+  test->ignore_client_close_error = TRUE;
+#endif
 
   read_test_data_async (test);
   g_main_loop_run (test->loop);
   wait_until_server_finished (test);
 
+#if BACKEND_IS_OPENSSL && defined(G_OS_WIN32)
+  test->ignore_client_close_error = FALSE;
+#endif
+
   g_assert_error (test->read_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);
 #if BACKEND_IS_OPENSSL
   g_assert_error (test->server_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]