The iotests module has a python class for controlling QEMU processes. Pull the generic functionality out of this file and create a scripts/qemu.py module containing a QEMUMachine class. Put the QTest integration support into a subclass QEMUQtestMachine.
6661397 scripts: refactor the VM class in iotests for reuse
scripts/qemu.py | 202 +++++++++++++++++++++++++++++++++++++++++
scripts/qtest.py | 34 +++++++
tests/qemu-iotests/iotests.py | 135 +--------------------------
3 files changed, 240 insertions(+), 131 deletions(-)
Upstream: git.qemu.org