Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qemu/tests/cfg/pvpanic_event_check.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
device_cmd = "cat /sys/devices/pci0000:00/0000:%s/QEMU0001:00/capability"
i440fx:
expected_cap = 1
skip_qmp_check = yes
q35:
expected_cap = 7
RHEL.7, RHEL.8, RHEL.9:
Expand Down
16 changes: 10 additions & 6 deletions qemu/tests/pvpanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def run(test, params, env):
with_events = params.get("with_events", "no") == "yes"
debug_type = params.get_numeric("debug_type")
events_pvpanic = params.get_numeric("events_pvpanic")
skip_qmp_check = params.get("skip_qmp_check", "no") == "yes"

error_context.context("Boot guest with pvpanic device", test.log.info)
vm = env.get_vm(params["main_vm"])
Expand Down Expand Up @@ -172,9 +173,12 @@ def run(test, params, env):
error_context.context("Trigger crash", test.log.info)
trigger_crash(test, vm, params)

error_context.context("Check the panic event in qmp", test.log.info)
result = check_qmp_events(vm, event_check, timeout)
if not check_empty and not result:
test.fail("Did not receive panic event notification")
elif check_empty and result:
test.fail("Did receive panic event notification, but should not")
if skip_qmp_check:
test.log.info("Skipping QMP event check for i440fx machine type")
else:
error_context.context("Check the panic event in qmp", test.log.info)
result = check_qmp_events(vm, event_check, timeout)
if not check_empty and not result:
test.fail("Did not receive panic event notification")
elif check_empty and result:
test.fail("Did receive panic event notification, but should not")