From patchwork Tue Jan 14 18:22:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 310844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 741BB2C0089 for ; Wed, 15 Jan 2014 05:23:33 +1100 (EST) Received: from localhost ([::1]:50036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W38eA-00030i-RK for incoming@patchwork.ozlabs.org; Tue, 14 Jan 2014 13:23:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W38dh-0002wn-Fs for qemu-devel@nongnu.org; Tue, 14 Jan 2014 13:23:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W38db-0000mO-4K for qemu-devel@nongnu.org; Tue, 14 Jan 2014 13:23:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W38da-0000lq-S6 for qemu-devel@nongnu.org; Tue, 14 Jan 2014 13:22:55 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0EIMo2P027619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jan 2014 13:22:50 -0500 Received: from localhost (ovpn-113-136.phx2.redhat.com [10.3.113.136]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0EIMnIu020268; Tue, 14 Jan 2014 13:22:49 -0500 Date: Tue, 14 Jan 2014 13:22:48 -0500 From: Luiz Capitulino To: Kevin Wolf Message-ID: <20140114132248.3f0be1dd@redhat.com> In-Reply-To: <20140114164451.GE3320@dhcp-200-207.str.redhat.com> References: <1389045795-18706-1-git-send-email-lcapitulino@redhat.com> <5573dbe5-6e4f-46f8-a77a-85919645417e@TX2EHSMHS027.ehs.local> <20140114164451.GE3320@dhcp-200-207.str.redhat.com> Organization: Red Hat Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: "Edgar E. Iglesias" , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Anthony Liguori , Anthony Liguori Subject: [Qemu-devel] Fix make check breakage (was [PULL 00/14] QMP queue) 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Tue, 14 Jan 2014 17:44:51 +0100 Kevin Wolf wrote: > Am 14.01.2014 um 04:38 hat Edgar E. Iglesias geschrieben: > > On Tue, Jan 14, 2014 at 09:27:10AM +1000, Peter Crosthwaite wrote: > > > Ping, > > > > > > Has this one been forgotten or are there issues? PMM had a small > > > comment, but he waived it AFAICT. > > > > Pong, > > > > I've merged it now, thanks! > > I believe it's something in this pull requests that breaks make check. And you're right. But first, let me confirm that we're talking about the same breakage. This is what I'm getting: make tests/check-qom-interface libqemuutil.a(qemu-error.o): In function `error_vprintf': /home/lcapitulino/work/src/upstream/qmp-unstable/util/qemu-error.c:23: undefined reference to `cur_mon' /home/lcapitulino/work/src/upstream/qmp-unstable/util/qemu-error.c:24: undefined reference to `cur_mon' /home/lcapitulino/work/src/upstream/qmp-unstable/util/qemu-error.c:24: undefined reference to `monitor_vprintf' libqemuutil.a(qemu-error.o): In function `error_printf_unless_qmp': /home/lcapitulino/work/src/upstream/qmp-unstable/util/qemu-error.c:47: undefined reference to `monitor_cur_is_qmp' libqemuutil.a(qemu-error.o): In function `error_print_loc': /home/lcapitulino/work/src/upstream/qmp-unstable/util/qemu-error.c:174: undefined reference to `cur_mon' collect2: error: ld returned 1 exit status make: *** [tests/check-qom-interface] Error 1 I tried bisecting it, but git bisect weren't capable of finding the culprit. So debugged it, and the problem was introduced by: commit 594278718323ca7bffaab0fb7fc6c82fa2c1cd5f Author: Peter Crosthwaite Date: Wed Jan 1 18:49:52 2014 -0800 qerror: Remove assert_no_error() There isn't nothing really wrong with this commit. The problem seems to be that the tests link against libqemuutil.a and this library pulls in everything from util/. The commit above changed util/error.c to call error_report(), which depends on 'cur_mon', which is only made available by monitor.o. I don't think we want to mess up with including monitor.o on libqemuutil.a. Besides, I now find it a bit weird to call error_report() from an error reporting function. So it's better to just call fprintf(stderr,) instead. Peter, Markus, are you ok with this patch? PS: I do run make check before sending a pull request, and did run this time too. Not sure how I didn't catch this. Thanks for the report Kevin! Acked-by: Peter Crosthwiate diff --git a/util/error.c b/util/error.c index f11f1d5..7c7650c 100644 --- a/util/error.c +++ b/util/error.c @@ -44,7 +44,7 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...) err->err_class = err_class; if (errp == &error_abort) { - error_report("%s", error_get_pretty(err)); + fprintf(stderr, "%s", error_get_pretty(err)); abort(); } @@ -80,7 +80,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class, err->err_class = err_class; if (errp == &error_abort) { - error_report("%s", error_get_pretty(err)); + fprintf(stderr, "%s", error_get_pretty(err)); abort(); } @@ -125,7 +125,7 @@ void error_set_win32(Error **errp, int win32_err, ErrorClass err_class, err->err_class = err_class; if (errp == &error_abort) { - error_report("%s", error_get_pretty(err)); + fprintf(stderr, "%s", error_get_pretty(err)); abort(); } @@ -171,7 +171,7 @@ void error_free(Error *err) void error_propagate(Error **dst_err, Error *local_err) { if (local_err && dst_err == &error_abort) { - error_report("%s", error_get_pretty(local_err)); + fprintf(stderr, "%s", error_get_pretty(local_err)); abort(); } else if (dst_err && !*dst_err) { *dst_err = local_err;