From gitlab-mirror at kemper.freedesktop.org Thu Nov 11 09:25:35 2021 From: gitlab-mirror at kemper.freedesktop.org (GitLab Mirror) Date: Thu, 11 Nov 2021 09:25:35 +0000 (UTC) Subject: [Spice-commits] AUTHORS server/tests Message-ID: <20211111092535.0697276193@kemper.freedesktop.org> AUTHORS | 1 + server/tests/test-leaks.c | 5 +++++ 2 files changed, 6 insertions(+) New commits: commit 3d32295f9e99054ae1a40d220ccef53a176c8aed Author: Simon Chopin Date: Wed Nov 10 14:03:58 2021 +0100 test-leaks: fix the test with OpenSSL3 In OpenSSL3, the SSL_accept call now emits proper errors, which we dump *before* emitting the expected "SSL_accept failed" error message. The g_test_expect_message framework doesn't really allow us to discard messages AFAICT, so instead we add a new expectation with fairly loose criteria. Fixes #63 Signed-off-by: Simon Chopin Acked-by: Frediano Ziglio diff --git a/AUTHORS b/AUTHORS index b2914602..a28cdb62 100644 --- a/AUTHORS +++ b/AUTHORS @@ -84,5 +84,6 @@ Patches also contributed by Tomasz K?oczko Qiuhao Li Hunter Sezen + Simon Chopin ....send patches to get your name here... diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c index be9fe2d2..53e15ba8 100644 --- a/server/tests/test-leaks.c +++ b/server/tests/test-leaks.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "test-glib-compat.h" #include "basic-event-loop.h" @@ -68,6 +69,10 @@ static void server_leaks(void) g_assert_cmpint(result, ==, 0); /* spice_server_add_ssl_client should not leak when it's given a disconnected socket */ +#if (OPENSSL_VERSION_NUMBER >= 0x30000000L) + /* Discard the OpenSSL-generated error logs */ + g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "*error:*:SSL*"); +#endif g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "*SSL_accept failed*"); g_assert_cmpint(socketpair(AF_LOCAL, SOCK_STREAM, 0, sv), ==, 0);