Skip to content

Commit

Permalink
test: Update qemu arguments to use bmc simulator
Browse files Browse the repository at this point in the history
THe qemu skiboot platform as of 8340a96 ("plat/qemu: use the common
OpenPOWER routines to initialize") uses the common aspeed BMC setup
routines. This means a BT interface is always set up, and if the
corresponding Qemu model is not present the timeout is 30 seconds.

It looks like this every time an IPMI message is sent:

 BT: seq 0x9e netfn 0x06 cmd 0x31: Maximum queue length exceeded
 BT: seq 0x9d netfn 0x06 cmd 0x31: Removed from queue
 BT: seq 0x9f netfn 0x06 cmd 0x31: Maximum queue length exceeded
 BT: seq 0x9e netfn 0x06 cmd 0x31: Removed from queue
 BT: seq 0xa0 netfn 0x06 cmd 0x31: Maximum queue length exceeded
 BT: seq 0x9f netfn 0x06 cmd 0x31: Removed from queue

Avoid this by adding the bmc simulator model to the Qemu powernv
machine.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
shenki authored and stewartsmith committed Dec 12, 2018
1 parent 1a07f8b commit 8da47e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/hello_world/run_qemu_hello_world.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

QEMU_ARGS="-M powernv -nographic -device ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10"

if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
Expand Down Expand Up @@ -30,7 +31,7 @@ trap "rm -f -- '$t'" EXIT
(
cat <<EOF | expect
set timeout 30
spawn $QEMU_BIN -m 1G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic
spawn $QEMU_BIN $QEMU_ARGS -kernel $SKIBOOT_ZIMAGE -nographic
expect {
timeout { send_user "\nTimeout waiting for hello world\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
Expand Down
3 changes: 2 additions & 1 deletion test/run_qemu-jessie-debian-installer_boot_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

QEMU_ARGS="-m 2G -M powernv -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0"

if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
Expand Down Expand Up @@ -39,7 +40,7 @@ T=$(mktemp --tmpdir skiboot_qemu_debian-jessie-boot_test.XXXXXXXXXX)

( cat <<EOF | expect
set timeout 600
spawn $QEMU_BIN -m 2G -M powernv -kernel debian-jessie-vmlinux -initrd debian-jessie-initrd.gz -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0
spawn $QEMU_BIN $QEMU_ARGS -kernel debian-jessie-vmlinux -initrd debian-jessie-initrd.gz
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
Expand Down
3 changes: 2 additions & 1 deletion test/run_qemu_boot_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

QEMU_ARGS="-M powernv -m 3G -nographic -device ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10"

if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
Expand Down Expand Up @@ -33,7 +34,7 @@ T=$(mktemp --tmpdir skiboot_qemu_boot_test.XXXXXXXXXX)

( cat <<EOF | expect
set timeout 600
spawn $QEMU_BIN -m 3G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0
spawn $QEMU_BIN $QEMU_ARGS -kernel $SKIBOOT_ZIMAGE
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
Expand Down

0 comments on commit 8da47e0

Please sign in to comment.