diff options
author | Thomas Huth <thuth@redhat.com> | 2016-06-14 19:23:03 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-06-17 09:47:59 +1000 |
commit | a1aa1309892581972b5019ef65fd0a12cd69cc28 (patch) | |
tree | 3618de178d838251f45f9960cbef36cb9c1d8780 /hw/ppc/spapr_pci_vfio.c | |
parent | 585fcd4b11070b3220685fc54ecca1991cdeb161 (diff) | |
download | qemu-a1aa1309892581972b5019ef65fd0a12cd69cc28.tar.gz qemu-a1aa1309892581972b5019ef65fd0a12cd69cc28.tar.bz2 qemu-a1aa1309892581972b5019ef65fd0a12cd69cc28.zip |
hw/ppc/spapr: Silence deprecation message in qtest mode
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 <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_pci_vfio.c')
-rw-r--r-- | hw/ppc/spapr_pci_vfio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index cbd3d23c91..f3cb141763 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) |