gio/tests: add unix-fd test to win32

The "/unix-fd/scm" test is quite Unix-specific, the next patch is going
to add a portable test.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2022-04-07 19:00:32 +04:00
parent 5efb84f24a
commit b8eb64b350
2 changed files with 9 additions and 2 deletions

View File

@@ -2,8 +2,11 @@
#include <gio/gnetworking.h>
#include <gio/gunixfdmessage.h>
#include <gio/gunixsocketaddress.h>
#include <string.h>
#ifdef G_OS_UNIX
#include <glib-unix.h>
#include <unistd.h>
#endif
#include <string.h>
/* ensures that no FDs are left open at the end */
static void
@@ -41,6 +44,7 @@ create_fd_list (gint *fd_list)
static void
test_scm (void)
{
#ifndef G_OS_WIN32
GError *err = NULL;
GUnixFDMessage *message;
GUnixFDMessage **mv;
@@ -228,6 +232,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_object_unref (list);
check_fd_list (fd_list);
#else
g_test_skip ("FD SCM support doesnt exist on Windows");
#endif
}
int