On Mon, Jun 22, 2020 at 08:57:18AM +0200, Greg Kurz wrote: > The device introspect test in qtest emits some warnings with the > the pnv machine types during the "nodefaults" phase: > > TEST check-qtest-ppc64: tests/qtest/device-introspect-test > qemu-system-ppc64: warning: machine has no BMC device. Use '-device > ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' to define > one > qemu-system-ppc64: warning: machine has no BMC device. Use '-device > ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' to define > one > qemu-system-ppc64: warning: machine has no BMC device. Use '-device > ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' to define > one > > This is expected since the pnv machine doesn't create the internal > BMC simulator fallback when "-nodefaults" is passed on the command > line, but these warnings appear in ci logs and confuse people. > > Not having a BMC isn't recommended but it is still a supported > configuration, so a straightforward fix is to just silent this > warning when qtest is enabled. > > Fixes: 25f3170b0654 ("ppc/pnv: Create BMC devices only when defaults are > enabled") > Reported-by: Philippe Mathieu-Daudé <phi...@redhat.com> > Signed-off-by: Greg Kurz <gr...@kaod.org>
Applied to ppc-for-5.1, thanks. > --- > hw/ppc/pnv.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c > index 806a5d9a8d34..1622d29b4ba7 100644 > --- a/hw/ppc/pnv.c > +++ b/hw/ppc/pnv.c > @@ -21,6 +21,7 @@ > #include "qemu-common.h" > #include "qemu/units.h" > #include "qapi/error.h" > +#include "sysemu/qtest.h" > #include "sysemu/sysemu.h" > #include "sysemu/numa.h" > #include "sysemu/reset.h" > @@ -587,9 +588,11 @@ static void pnv_reset(MachineState *machine) > bmc = pnv_bmc_find(&error_fatal); > if (!pnv->bmc) { > if (!bmc) { > - warn_report("machine has no BMC device. Use '-device " > - "ipmi-bmc-sim,id=bmc0 -device > isa-ipmi-bt,bmc=bmc0,irq=10' " > - "to define one"); > + if (!qtest_enabled()) { > + warn_report("machine has no BMC device. Use '-device " > + "ipmi-bmc-sim,id=bmc0 -device > isa-ipmi-bt,bmc=bmc0,irq=10' " > + "to define one"); > + } > } else { > pnv_bmc_set_pnor(bmc, pnv->pnor); > pnv->bmc = bmc; > > -- 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
signature.asc
Description: PGP signature