[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 30de46: vhost-user-test: Fix 'make check' bro
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 30de46: vhost-user-test: Fix 'make check' broken on glib <... |
Date: |
Wed, 05 Nov 2014 06:30:06 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 30de46db50d2f9f74c5f7ab1cc463b8dec026407
https://github.com/qemu/qemu/commit/30de46db50d2f9f74c5f7ab1cc463b8dec026407
Author: Gonglei <address@hidden>
Date: 2014-11-05 (Wed, 05 Nov 2014)
Changed paths:
M tests/vhost-user-test.c
Log Message:
-----------
vhost-user-test: Fix 'make check' broken on glib < 2.26
After commit 89b516d8, some logics is turbid and
breaks 'make check' as below errors:
tests/vhost-user-test.c: In function '_cond_wait_until':
tests/vhost-user-test.c:154: error: 'G_TIME_SPAN_SECOND' undeclared (first use
in this function)
tests/vhost-user-test.c:154: error: (Each undeclared identifier is reported
only once
tests/vhost-user-test.c:154: error: for each function it appears in.)
tests/vhost-user-test.c: In function 'read_guest_mem':
tests/vhost-user-test.c:192: warning: implicit declaration of function
'g_get_monotonic_time'
tests/vhost-user-test.c:192: warning: nested extern declaration of
'g_get_monotonic_time'
tests/vhost-user-test.c:192: error: 'G_TIME_SPAN_SECOND' undeclared (first use
in this function)
make: *** [tests/vhost-user-test.o] Error 1
First, vhost-usr-test.c rely on glib-compat.h because
of using G_TIME_SPAN_SECOND [glib < 2.26] and g_get_monotonic_time(),
but vhost-usr-test.c defined QEMU_GLIB_COMPAT_H, which make
glib-compat.h will not be included.
Second, if we remove QEMU_GLIB_COMPAT_H definability in
vhost-usr-test.c, then we will get below warnings:
tests/vhost-user-test.c: In function 'read_guest_mem':
tests/vhost-user-test.c:190: warning: passing argument 1 of 'g_mutex_lock' from
incompatible pointer type
tests/vhost-user-test.c:234: warning: passing argument 1 of 'g_mutex_unlock'
from incompatible pointer type
That's because glib-compat.h redefine the g_mutex_lock/unlock
function. Those functions' arguments is CompatGMutex/CompatGCond,
but vhost-user-test.c is using GMutex/GCond, which cause the type
is not consistent.
We can rerealize those functions of vhost-user-test.c,
which need a lots of patches. Let's simply address it, and
leave this file alone.
Signed-off-by: Gonglei <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 30de46: vhost-user-test: Fix 'make check' broken on glib <...,
GitHub <=