summaryrefslogtreecommitdiffstats
path: root/tests/vhost-user-test.c
diff options
context:
space:
mode:
authorPeter Maydell2018-06-29 16:04:20 +0200
committerPeter Maydell2018-06-29 16:04:20 +0200
commit75507f1aba6feb73ae43329922d51571550b9128 (patch)
treeafdc91cca05f534d22838da16dac63e13ace3307 /tests/vhost-user-test.c
parentMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff)
parentglib: enforce the minimum required version and warn about old APIs (diff)
downloadqemu-75507f1aba6feb73ae43329922d51571550b9128.tar.gz
qemu-75507f1aba6feb73ae43329922d51571550b9128.tar.xz
qemu-75507f1aba6feb73ae43329922d51571550b9128.zip
Merge remote-tracking branch 'remotes/berrange/tags/min-glib-pull-request' into staging
glib: update the min required version This updates the minimum required glib version to 2.40 # gpg: Signature made Fri 29 Jun 2018 12:24:58 BST # gpg: using RSA key BE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/min-glib-pull-request: glib: enforce the minimum required version and warn about old APIs glib: bump min required glib library version to 2.40 util: remove redundant include of glib.h and add osdep.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/vhost-user-test.c')
-rw-r--r--tests/vhost-user-test.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index bbc8091286..8ff2106d32 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -32,14 +32,6 @@
#include <linux/virtio_net.h>
#include <sys/vfs.h>
-/* GLIB version compatibility flags */
-#if !GLIB_CHECK_VERSION(2, 26, 0)
-#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT(1000000))
-#endif
-
-#if GLIB_CHECK_VERSION(2, 28, 0)
-#define HAVE_MONOTONIC_TIME
-#endif
#define QEMU_CMD_MEM " -m %d -object memory-backend-file,id=mem,size=%dM," \
"mem-path=%s,share=on -numa node,memdev=mem"
@@ -150,8 +142,8 @@ typedef struct TestServer {
int fds_num;
int fds[VHOST_MEMORY_MAX_NREGIONS];
VhostUserMemory memory;
- CompatGMutex data_mutex;
- CompatGCond data_cond;
+ GMutex data_mutex;
+ GCond data_cond;
int log_fd;
uint64_t rings;
bool test_fail;
@@ -642,21 +634,7 @@ test_migrate_source_check(GSource *source)
return FALSE;
}
-#if !GLIB_CHECK_VERSION(2,36,0)
-/* this callback is unnecessary with glib >2.36, the default
- * prepare for the source does the same */
-static gboolean
-test_migrate_source_prepare(GSource *source, gint *timeout)
-{
- *timeout = -1;
- return FALSE;
-}
-#endif
-
GSourceFuncs test_migrate_source_funcs = {
-#if !GLIB_CHECK_VERSION(2,36,0)
- .prepare = test_migrate_source_prepare,
-#endif
.check = test_migrate_source_check,
};