aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-08-23 16:44:03 +0200
committerKevin Wolf <kwolf@redhat.com>2016-09-05 19:06:48 +0200
commitc0088d79a7d0d9070a46331b60ec8aa871fe2085 (patch)
treefda53f001e3c29baf0ea04f5f9cae4fffd608943 /tests
parent1562047c899ccecdf8af9645ce7fd35fcd2fdb31 (diff)
downloadqemu-c0088d79a7d0d9070a46331b60ec8aa871fe2085.zip
qemu-c0088d79a7d0d9070a46331b60ec8aa871fe2085.tar.gz
qemu-c0088d79a7d0d9070a46331b60ec8aa871fe2085.tar.bz2
qemu-iotests: Log QMP traffic in debug mode
Python tests are already annoying enough to debug. With QMP traffic available it's a little bit easier at least. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 69aa41e..f1f36d7 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -50,6 +50,7 @@ cachemode = os.environ.get('CACHEMODE')
qemu_default_machine = os.environ.get('QEMU_DEFAULT_MACHINE')
socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper')
+debug = False
def qemu_img(*args):
'''Run qemu-img and return the exit code'''
@@ -134,6 +135,8 @@ class VM(qtest.QEMUQtestMachine):
def __init__(self):
super(VM, self).__init__(qemu_prog, qemu_opts, test_dir=test_dir,
socket_scm_helper=socket_scm_helper)
+ if debug:
+ self._debug = True
self._num_drives = 0
def add_drive_raw(self, opts):
@@ -318,6 +321,8 @@ def verify_quorum():
def main(supported_fmts=[], supported_oses=['linux']):
'''Run tests'''
+ global debug
+
# We are using TEST_DIR and QEMU_DEFAULT_MACHINE as proxies to
# indicate that we're not being run via "check". There may be
# other things set up by "check" that individual test cases rely