From patchwork Sun Jun 29 20:31:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 32677 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4005D23577 for ; Sun, 29 Jun 2014 20:32:44 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id y20sf47512598ier.9 for ; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :from:date:message-id:to:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=8ZOxd/eKOXZIDTl1+gaZIU99J/fhCglwk/KxcMV8F2w=; b=bAV4j4cZDBMdsbf7e4RHrQIHLvigITcsffNGd/h5Ze49rEzCSF1hVSk30m54JweR2M NI4XvHjoEzxf8KljIpa0oEYRb6Ot2iRRCLu1g2dr35nSwBbypkRriUS3YIBBBfIz3++x SzU+MvHquf6DDA3vngjCLDmU1aL+sROjZLm0B/AOKhPpB2zenz9oTFdpySVcDlZ4Akpx 2MA/Q0kGVH9zx048LilL1d/Dd2T/GC/ThlEBLriNdcdXdXhnO/CF0l9svpVchrYNV+OR na9NF1tXu2Cd6qxNJK3ehoVOcezMCOQrmKZJt2BxrbsVh64/JniKLgT96kYz1sYALq8O H84w== X-Gm-Message-State: ALoCoQmIYEygfLLvOhahvG8duRNeqSVsNBytJsSDfd5e2J5WaSu1XBjD2BgWTVQwQs568vr0Z+WD X-Received: by 10.43.173.71 with SMTP id ob7mr17724790icc.19.1404073963699; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.225 with SMTP id o88ls1255405qge.88.gmail; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-Received: by 10.220.251.134 with SMTP id ms6mr14870839vcb.10.1404073963598; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id yf19si9178920vdb.30.2014.06.29.13.32.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Jun 2014 13:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id im17so6728586vcb.39 for ; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-Received: by 10.221.64.20 with SMTP id xg20mr33798346vcb.3.1404073963474; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp91602vcb; Sun, 29 Jun 2014 13:32:43 -0700 (PDT) X-Received: by 10.140.40.20 with SMTP id w20mr51555982qgw.92.1404073962867; Sun, 29 Jun 2014 13:32:42 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t6si10292307qcs.8.2014.06.29.13.32.42 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 29 Jun 2014 13:32:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1LmE-0005O3-F3 for patch@linaro.org; Sun, 29 Jun 2014 16:32:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Lli-00056e-Cn for qemu-devel@nongnu.org; Sun, 29 Jun 2014 16:32:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1Lla-0003Oo-SR for qemu-devel@nongnu.org; Sun, 29 Jun 2014 16:32:10 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:39875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Lla-0003Od-H3 for qemu-devel@nongnu.org; Sun, 29 Jun 2014 16:32:02 -0400 Received: by mail-la0-f53.google.com with SMTP id b8so4335711lan.12 for ; Sun, 29 Jun 2014 13:32:01 -0700 (PDT) X-Received: by 10.152.21.132 with SMTP id v4mr27444416lae.23.1404073921242; Sun, 29 Jun 2014 13:32:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.158.228 with HTTP; Sun, 29 Jun 2014 13:31:41 -0700 (PDT) In-Reply-To: <20140627142807.3a5772c5@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> <20140627142807.3a5772c5@redhat.com> From: Peter Maydell Date: Sun, 29 Jun 2014 21:31:41 +0100 Message-ID: To: Luiz Capitulino X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.215.53 Cc: QEMU Developers , Paolo Bonzini , Markus Armbruster , Wenchao Xia Subject: Re: [Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib < 2.31 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On 27 June 2014 19:28, Luiz Capitulino wrote: > 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 ‘main’: >> > /home/lcapitulino/work/src/upstream/qmp-unstable/tests/test-qmp-event.c:254:5: error: ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Werror=deprecated-declarations] >> > 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 instead. >> > Also, note that thread_init()'s body is duplicated in a few other places, >> > so maybe those places should call it too. >> > >> > You may want to do this in a different series, then I can skip this patch >> > and apply the rest of the series. >> > >> >> Thanks Luiz, it's a good suggestion. > > Paolo, Wenchao, are one of one going to work on this? Ping! Can we have at least a local fix using glib version #ifdefs before Tuesday please? Otherwise we need to do something like this to avoid shipping an rc0 which doesn't pass make check on some systems. tests/test-qapi-event.o thanks -- PMM diff --git a/tests/Makefile b/tests/Makefile index 7e53d0d..a1a0dae 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -27,8 +27,6 @@ check-unit-y += tests/test-string-input-visitor$(EXESUF) gcov-files-test-string-input-visitor-y = qapi/string-input-visitor.c check-unit-y += tests/test-string-output-visitor$(EXESUF) gcov-files-test-string-output-visitor-y = qapi/string-output-visitor.c -check-unit-y += tests/test-qmp-event$(EXESUF) -gcov-files-test-qmp-event-y += qapi/qmp-event.c check-unit-y += tests/test-opts-visitor$(EXESUF) gcov-files-test-opts-visitor-y = qapi/opts-visitor.c check-unit-y += tests/test-coroutine$(EXESUF) @@ -213,7 +211,7 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \ tests/test-qmp-input-visitor.o tests/test-qmp-input-strict.o \ tests/test-qmp-commands.o tests/test-visitor-serialization.o \ tests/test-x86-cpuid.o tests/test-mul64.o tests/test-int128.o \ - tests/test-opts-visitor.o tests/test-qmp-event.o + tests/test-opts-visitor.o test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \