Skip to content
Browse files

driver: qemudriver: raise meaningful exception if QEMU process termin…


Signed-off-by: Bastian Krause <>
  • Loading branch information
Bastian-Krause authored and Emantor committed Jan 6, 2020
1 parent f39f330 commit 437a8476e7d1553949af1205d2d705190c221f04
Showing with 10 additions and 2 deletions.
  1. +10 −2 labgrid/driver/
@@ -17,7 +17,7 @@
from ..step import step
from .common import Driver
from .consoleexpectmixin import ConsoleExpectMixin
from ..util.qmp import QMPMonitor
from ..util.qmp import QMPMonitor, QMPError
from .exception import ExecutionError

@@ -182,7 +182,15 @@ def on(self):
self._clientsocket, address = self._socket.accept()
self.logger.debug("new connection from %s", address)
self.qmp = QMPMonitor(self._child.stdout, self._child.stdin)

self.qmp = QMPMonitor(self._child.stdout, self._child.stdin)
except QMPError as exc:
if self._child.poll() is not None:
raise IOError("QEMU process terminated with exit code {}"
.format(self._child.returncode)) from exc

self.status = 1

0 comments on commit 437a847

Please sign in to comment.
You can’t perform that action at this time.