]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: switch away from HAVE_SOCKETPAIR
authorPino Toscano <ptoscano@redhat.com>
Thu, 19 Mar 2020 11:02:45 +0000 (12:02 +0100)
committerPino Toscano <ptoscano@redhat.com>
Thu, 19 Mar 2020 13:39:38 +0000 (14:39 +0100)
Since the removal of gnulib, HAVE_SOCKETPAIR is no more defined, making
these two tests effectively skipped.

Use the same strategy used in other generic library bits, i.e. exclude
the socketpair usage on Windows.

Semi-related change in virnetdaemontest.c to make it build: since
virutil.h does not include unistd.h anymore, we need to include it.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests/virnetdaemontest.c
tests/virnetserverclienttest.c

index 825487f0a134b1c1e31cc783327fd337d76ddf02..09d268627ce9f5a6ef7a88260db6ea6fcd7d1b7b 100644 (file)
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "testutils.h"
 #include "virerror.h"
 #include "rpc/virnetdaemon.h"
 
 #define VIR_FROM_THIS VIR_FROM_RPC
 
-#if defined(HAVE_SOCKETPAIR) && defined(WITH_YAJL)
+#if !defined(WIN32) && defined(WITH_YAJL)
 struct testClientPriv {
     int magic;
 };
index a9a56c48d5081528edc54ae69a62061d8e40c8c6..668fd02a1eff16d9c609a0ec9c572f2b965643b0 100644 (file)
@@ -24,7 +24,7 @@
 
 #define VIR_FROM_THIS VIR_FROM_RPC
 
-#ifdef HAVE_SOCKETPAIR
+#ifndef WIN32
 
 static void *
 testClientNew(virNetServerClientPtr client G_GNUC_UNUSED,