* [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode
@ 2016-06-14 17:23 Thomas Huth
2016-06-15 3:10 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2016-06-14 17:23 UTC (permalink / raw)
To: qemu-ppc, qemu-devel, david; +Cc: agraf, Alexey Kardashevskiy
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>
---
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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode
2016-06-14 17:23 [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode Thomas Huth
@ 2016-06-15 3:10 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2016-06-15 3:10 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-ppc, qemu-devel, agraf, Alexey Kardashevskiy
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
On Tue, Jun 14, 2016 at 07:23:03PM +0200, Thomas Huth wrote:
> 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>
Applied to ppc-for-2.7, thanks.
> ---
> 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)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-15 3:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 17:23 [Qemu-devel] [PATCH] hw/ppc/spapr: Silence deprecation message in qtest mode Thomas Huth
2016-06-15 3:10 ` David Gibson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.