From patchwork Tue Jun 14 17:23:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 9176347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 874846048C for ; Tue, 14 Jun 2016 17:24:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AFB42793B for ; Tue, 14 Jun 2016 17:24:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6C72823D; Tue, 14 Jun 2016 17:24:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 298DB2793B for ; Tue, 14 Jun 2016 17:24:32 +0000 (UTC) Received: from localhost ([::1]:37154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCs4l-00047O-B7 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 14 Jun 2016 13:24:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCs3T-0003I7-Tq for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:23:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCs3P-0007jz-Sm for qemu-devel@nongnu.org; Tue, 14 Jun 2016 13:23:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCs3P-0007js-Mr; Tue, 14 Jun 2016 13:23:07 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22FE1C049D59; Tue, 14 Jun 2016 17:23:07 +0000 (UTC) Received: from thh440s.fritz.box (vpn1-6-197.ams2.redhat.com [10.36.6.197]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5EHN3GM026208; Tue, 14 Jun 2016 13:23:04 -0400 From: Thomas Huth To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au Date: Tue, 14 Jun 2016 19:23:03 +0200 Message-Id: <1465924983-30470-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 14 Jun 2016 17:23:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , agraf@suse.de Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP When running "make check", there is currently always an error message saying "spapr-pci-vfio-host-bridge is deprecated". This happens because the QOM tests are instantiating all possible devices, and the error message is currently located in the instance_init() function of the device. Since it is legal for the tests to instantiate a device without using it, the error message should be silenced when we're running in test mode. Signed-off-by: Thomas Huth --- hw/ppc/spapr_pci_vfio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index cbd3d23..f3cb141 100644 --- a/hw/ppc/spapr_pci_vfio.c +++ b/hw/ppc/spapr_pci_vfio.c @@ -27,6 +27,7 @@ #include "linux/vfio.h" #include "hw/vfio/vfio.h" #include "qemu/error-report.h" +#include "sysemu/qtest.h" #define TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE "spapr-pci-vfio-host-bridge" @@ -48,7 +49,9 @@ static Property spapr_phb_vfio_properties[] = { static void spapr_phb_vfio_instance_init(Object *obj) { - error_report("spapr-pci-vfio-host-bridge is deprecated"); + if (!qtest_enabled()) { + error_report("spapr-pci-vfio-host-bridge is deprecated"); + } } bool spapr_phb_eeh_available(sPAPRPHBState *sphb)