From: John Snow Date: Thu, 18 Nov 2021 20:46:19 +0000 (-0500) Subject: scripts/device-crash-test: Use a QMP timeout X-Git-Tag: v6.2.0-rc2~4^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=206439cd8937a3dc556537074d5d37e5d74eb0d0;p=thirdparty%2Fqemu.git 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 Message-id: 20211118204620.1897674-7-jsnow@redhat.com Signed-off-by: John Snow --- diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 1c73dac93ee..7fbd99158be 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -353,7 +353,7 @@ def checkOneCase(args, testcase): '-device', qemuOptsEscape(device)] cmdline = ' '.join([binary] + args) dbg("will launch QEMU: %s", cmdline) - vm = QEMUMachine(binary=binary, args=args) + vm = QEMUMachine(binary=binary, args=args, qmp_timer=15) exc = None exc_traceback = None