From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0asi-0003Xm-FZ for qemu-devel@nongnu.org; Fri, 27 Jun 2014 14:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0asc-0000zm-A1 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 14:28:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0asc-0000yA-1C for qemu-devel@nongnu.org; Fri, 27 Jun 2014 14:28:10 -0400 Date: Fri, 27 Jun 2014 14:28:07 -0400 From: Luiz Capitulino Message-ID: <20140627142807.3a5772c5@redhat.com> In-Reply-To: <53AACB77.8000205@redhat.com> References: <1403652840-13449-1-git-send-email-wenchaoqemu@gmail.com> <1403652840-13449-2-git-send-email-wenchaoqemu@gmail.com> <20140625091351.7779916b@redhat.com> <53AACB77.8000205@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib < 2.31 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: armbru@redhat.com, Wenchao Xia , qemu-devel@nongnu.org On Wed, 25 Jun 2014 15:15:35 +0200 Paolo Bonzini wrote: > Il 25/06/2014 15:13, Luiz Capitulino ha scritto: > > On Tue, 24 Jun 2014 16:33:56 -0700 > > Wenchao Xia wrote: > > > >> From: Paolo Bonzini > >> > >> On old GLib, the test needs a g_thread_init call. > >> > >> Reported-by: Wenchao Xia > >> Signed-off-by: Paolo Bonzini > >> Tested-by: Wenchao Xia > >> Signed-off-by: Wenchao Xia > >> --- > >> tests/test-qmp-event.c | 1 + > >> 1 files changed, 1 insertions(+), 0 deletions(-) > >> > >> diff --git a/tests/test-qmp-event.c b/tests/test-qmp-event.c > >> index cb1e441..17c6444 100644 > >> --- a/tests/test-qmp-event.c > >> +++ b/tests/test-qmp-event.c > >> @@ -251,6 +251,7 @@ static void test_event_d(TestEventData *data, > >> > >> int main(int argc, char **argv) > >> { > >> + g_thread_init(NULL); > >> qmp_event_set_func_emit(event_test_emit); > >> > >> g_test_init(&argc, &argv, NULL); > > > > This breaks make check on F20: > > > > """ > > /home/lcapitulino/work/src/upstream/qmp-unstable/tests/test-qmp-event.c= : In function =E2=80=98main=E2=80=99: > > /home/lcapitulino/work/src/upstream/qmp-unstable/tests/test-qmp-event.c= :254:5: error: =E2=80=98g_thread_init=E2=80=99 is deprecated (declared at /= usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Werror=3Ddeprecated-d= eclarations] > > g_thread_init(NULL); > > ^ > > cc1: all warnings being treated as errors > > make: *** [tests/test-qmp-event.o] Error 1 > > """ > > > > I think the best way to fix this is to make util/osdep.c:thread_init() > > public (maybe by moving it to include/glib-compat.h) and use that inste= ad. > > Also, note that thread_init()'s body is duplicated in a few other place= s, > > so maybe those places should call it too. > > > > You may want to do this in a different series, then I can skip this pat= ch > > and apply the rest of the series. > > >=20 > Thanks Luiz, it's a good suggestion. Paolo, Wenchao, are one of one going to work on this?