scripts/device-crash-test: Use a QMP timeout
Despite all the previous fixes, it's still possible for device-crash-test to wedge itself in the case that QEMU terminates *so quickly* that it doesn't even begin a connection attempt to our QMP client. Python will just joyfully wait ad infinitum for a connection that will now never arrive. The real fix is to use asyncio to simultaneously poll both the health of the launched process AND the connection attempt. That's quite a bit more invasive than just setting a connection timeout, though. Do the very simplest thing for now. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20211118204620.1897674-7-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
1611e6cf4e
commit
206439cd89
@ -353,7 +353,7 @@ def checkOneCase(args, testcase):
|
|||||||
'-device', qemuOptsEscape(device)]
|
'-device', qemuOptsEscape(device)]
|
||||||
cmdline = ' '.join([binary] + args)
|
cmdline = ' '.join([binary] + args)
|
||||||
dbg("will launch QEMU: %s", cmdline)
|
dbg("will launch QEMU: %s", cmdline)
|
||||||
vm = QEMUMachine(binary=binary, args=args)
|
vm = QEMUMachine(binary=binary, args=args, qmp_timer=15)
|
||||||
|
|
||||||
exc = None
|
exc = None
|
||||||
exc_traceback = None
|
exc_traceback = None
|
||||||
|
Loading…
Reference in New Issue
Block a user