Skip to content

Commit 38d2448

Browse files
gkurzdgibson
authored andcommitted
ppc/pnv: Silence missing BMC warning with qtest
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: 25f3170 ("ppc/pnv: Create BMC devices only when defaults are enabled") Reported-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Greg Kurz <[email protected]> Message-Id: <[email protected]> Reviewed-by: Cédric Le Goater <[email protected]> Signed-off-by: David Gibson <[email protected]>
1 parent 7861e08 commit 38d2448

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hw/ppc/pnv.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "qemu-common.h"
2222
#include "qemu/units.h"
2323
#include "qapi/error.h"
24+
#include "sysemu/qtest.h"
2425
#include "sysemu/sysemu.h"
2526
#include "sysemu/numa.h"
2627
#include "sysemu/reset.h"
@@ -587,9 +588,11 @@ static void pnv_reset(MachineState *machine)
587588
bmc = pnv_bmc_find(&error_fatal);
588589
if (!pnv->bmc) {
589590
if (!bmc) {
590-
warn_report("machine has no BMC device. Use '-device "
591-
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
592-
"to define one");
591+
if (!qtest_enabled()) {
592+
warn_report("machine has no BMC device. Use '-device "
593+
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
594+
"to define one");
595+
}
593596
} else {
594597
pnv_bmc_set_pnor(bmc, pnv->pnor);
595598
pnv->bmc = bmc;

0 commit comments

Comments
 (0)