Skip to content

virt-test: Distinguish debug output from src/dest qemus in debug.log #1340

@dagrh

Description

@dagrh

I'm debugging migrations, and the deubg.log contains a mix of the debug output from the two qemus. It gets a bit messy to pick the debug from the two sides of the argument out.

The attached (very lightly tested) patch changes the prefix for the destination side; so it has

[qemu/dst output] instead of [qemu output]

Author: Dr. David Alan Gilbert [email protected]
Date: Fri Jan 10 11:34:51 2014 +0000

Prefix qemu output differently for destination
diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
index cd92589..035797c 100644
--- a/virttest/qemu_vm.py
+++ b/virttest/qemu_vm.py
@@ -1978,6 +1978,9 @@ class VM(virt_vm.BaseVM):
                                            'Check the log for traceback.')

             # Add migration parameters if required
+            qemu_op_prefix = "qemu"
+            if migration_mode != None:
+                qemu_op_prefix += "/dst"
             if migration_mode in ["tcp", "rdma", "x-rdma"]:
                 self.migration_port = utils_misc.find_free_port(5200, 6000)
                 qemu_command += (" -incoming " + migration_mode +
@@ -2030,7 +2033,7 @@ class VM(virt_vm.BaseVM):
                 self.process = aexpect.run_tail(qemu_command,
                                                 None,
                                                 logging.info,
-                                                "[qemu output] ",
+                                                "["+qemu_op_prefix+" output] ",
                                                 auto_close=False)

             logging.info("Created qemu process with parent PID %d",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions