[PATCH spice-server v5 11/18] test-leaks: Use socket compatibility layer

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

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/tests/test-leaks.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c
index 64130c22a..be9fe2d2e 100644
--- a/server/tests/test-leaks.c
+++ b/server/tests/test-leaks.c
@@ -35,6 +35,7 @@
 #include "test-glib-compat.h"
 #include "basic-event-loop.h"
 #include "test-display-base.h"
+#include "sys-socket.h"
 
 #define PKI_DIR SPICE_TOP_SRCDIR "/server/tests/pki/"
 
@@ -70,11 +71,11 @@ static void server_leaks(void)
     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);
-    close(sv[1]);
+    socket_close(sv[1]);
     result = spice_server_add_ssl_client(server, sv[0], 1);
     g_assert_cmpint(result, ==, -1);
     /* if the function fails, it should not close the socket */
-    g_assert_cmpint(close(sv[0]), ==, 0);
+    g_assert_cmpint(socket_close(sv[0]), ==, 0);
 
     spice_server_destroy(server);
     basic_event_loop_destroy();
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]